home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / keyb / anarkey4.zip / ANARKEY.DOC < prev    next >
Text File  |  1991-05-01  |  173KB  |  3,874 lines

  1.  
  2.  
  3.          ANARKEY
  4.  
  5.          User Manual
  6.  
  7.  
  8.          Version 4.0
  9.  
  10.  
  11.  
  12.  
  13.          Anarchy: A state of being without rulers
  14.  
  15.  
  16.          Anarkey: A state of being without keystrokes
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.          Steven Calwas
  38.          Moderne Software
  39.          P.O. Box 3638
  40.          Santa Clara, CA 95055-3638
  41.          (408)247-0509
  42.  
  43.  
  44.  
  45.  
  46.          Copyright (C) 1988-1991
  47.          by Steven Calwas
  48.          All rights reserved
  49.  
  50.  
  51.          Anarkey User Manual
  52.  
  53.  
  54.          Published by: Moderne Software
  55.                        P.O. Box 3638
  56.                        Santa Clara, CA 95055-3638
  57.                        (408)247-0509
  58.  
  59.  
  60.          Copyright (C) 1991 by Steven Calwas
  61.  
  62.  
  63.          All rights reserved.  No part of this book may be reproduced
  64.          or transmitted in any form or by any means, electronic or
  65.          mechanical, including photocopying, recording, or by any
  66.          information storage and retrieval system, without permission
  67.          in writing from the Publisher.
  68.  
  69.  
  70.  
  71.  
  72.          WARRANTY
  73.  
  74.          THE ANARKEY PRODUCT IS LICENSED "AS IS" WITHOUT ANY WARRANTY
  75.          OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
  76.          PERFORMANCE, OR OTHERWISE.  ALL WARRANTIES ARE EXPRESSLY
  77.          DISCLAIMED.  BY USING THE ANARKEY PRODUCT, YOU AGREE THAT
  78.          NEITHER STEVEN CALWAS NOR MODERNE SOFTWARE NOR ANY OFFICERS,
  79.          DIRECTORS, EMPLOYEES, SHAREHOLDERS, AFFILIATES, OWNERS, OR
  80.          ANY OTHER RELATED PARTIES WILL BE LIABLE TO YOU OR ANY THIRD
  81.          PARTY FOR ANY USE OF (OR INABILITY TO USE) OR PERFORMANCE OF
  82.          THIS PRODUCT, OR FOR ANY DAMAGES WHATSOEVER WHETHER BASED ON
  83.          CONTRACT, TORT OR OTHERWISE EVEN IF WE ARE NOTIFIED OF SUCH
  84.          POSSIBILITY IN ADVANCE.  (SOME STATES DO NOT ALLOW THE
  85.          EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
  86.          DAMAGES, SO THE FOREGOING LIMITATION MAY NOT APPLY TO YOU.)
  87.  
  88.  
  89.          Chapter 1
  90.  
  91.          Introduction and Tutorial
  92.  
  93.          Anarkey is an intelligent command-line editor for DOS.  With
  94.          Anarkey, complete input lines can be entered with two or
  95.          three keystrokes.  Anarkey is intelligent because there is
  96.          no need to tell it what you want to enter on the command
  97.          line; simply press the <Tab> key and Anarkey figures out
  98.          what you want and does it for you.
  99.  
  100.          Anarkey knows what you want and gives it to you!
  101.  
  102.          Here is a list of the main operations Anarkey provides.
  103.  
  104.  
  105.          * Line-edit features comparable to those found in word
  106.          processors
  107.  
  108.          * Ability to save input lines for later retrieval
  109.  
  110.          * Three methods to retrieve saved command lines
  111.                  1) Sequentially walk through the list of saved
  112.                     commands
  113.  
  114.                  2) Line completion where you enter a portion of the
  115.                     line and Anarkey completes the remainder for you
  116.  
  117.                  3) Pop-up window which lists all saved commands.
  118.                     Supports a mouse.
  119.  
  120.          * A text substitution capability called an AKA (also
  121.          referred to as an "alias" or "synonym").  The Convert
  122.          program is included in the Anarkey package to translate the
  123.          alias and synonym definitions of other editors to Anarkey's
  124.          format.  AKAs can even be executed from a batch file.
  125.  
  126.          * Enter multiple commands on a single input line
  127.  
  128.          * A 255-character input line
  129.  
  130.          * Comprehensive filename completion
  131.  
  132.          * Environment variable editing
  133.  
  134.          * Use expanded memory
  135.  
  136.          * Display a non-blinking cursor
  137.  
  138.          * Pop-up windows with built-in mouse support to retrieve
  139.          saved commands, complete filenames and edit environment
  140.          variables
  141.  
  142.          * Configurable key assignments
  143.  
  144.          * A MegaKey which analyzes the input line, determines the
  145.          type of Anarkey operation you want and does it for you
  146.          automatically.  The MegaKey is what makes Anarkey an
  147.          intelligent command-line editor.
  148.  
  149.          * Write the list of saved commands and AKAs to a disk file
  150.          for future restoration
  151.  
  152.          * Comprehensive UNIX switchar support
  153.  
  154.          * Pop-up help window with configurable help text
  155.  
  156.          * Full-support for enhanced 101/102-key keyboards
  157.  
  158.          * Pop-up windows offer your choice between two mouse
  159.          interfaces
  160.  
  161.          * Special support for the 386 Enhanced Mode of Microsoft
  162.          Windows 3.0
  163.  
  164.          * And much more!
  165.  
  166.  
  167.          Anarkey is written entirely in assembly language for maximum
  168.          efficiency in memory usage and execution speed.  When
  169.          installed in its default configuration, Anarkey uses about
  170.          11K of memory.  If expanded memory is available, Anarkey
  171.          requires only 1K of conventional memory.
  172.  
  173.          Installation
  174.  
  175.          To install Anarkey onto your system, copy all files from the
  176.          distribution disk to your hard disk.  If you do not have a
  177.          hard disk, copy the ANARKEY.COM program onto your boot disk.
  178.  
  179.          Anarkey makes significant use of the Anarkmd program.  To
  180.          guarantee that Anarkey work properly at all times, place the
  181.          ANARKMD.EXE file in a directory specified in the PATH
  182.          environment variable.
  183.  
  184.          To run Anarkey, execute the ANARKEY.COM program from either
  185.          the DOS prompt or your AUTOEXEC.BAT file.  Since you will
  186.          probably want Anarkey active whenever you are using your
  187.          computer, executing Anarkey from the AUTOEXEC.BAT file makes
  188.          the most sense.
  189.  
  190.          When run, Anarkey installs itself into the DOS environment
  191.          and terminates, but stays resident.  A default configuration
  192.          is used, but can be modified via command-line options.
  193.          Anarkey options are described in Chapter 11.  For the
  194.          remainder of this tutorial, we assume the default
  195.          configuration is in effect.
  196.  
  197.          Once resident, Anarkey handles all input requests for the
  198.          following situations:
  199.  
  200.          * The DOS command line
  201.  
  202.          * Redirected input
  203.  
  204.          * DEBUG, SYMDEB, EDLIN and several third-party programs
  205.  
  206.          * All DOS sessions running under Windows 3.0 in 386 enhanced
  207.          mode
  208.  
  209.          Notice that Anarkey does not process lines executed from a
  210.          batch file.  However, the Anarkmd program described in
  211.          Chapter 16 provides an indirect method to support batch
  212.          files.  For now, we will postpone that topic.
  213.  
  214.          The remainder of this chapter is a tutorial on using
  215.          Anarkey's basic features.  It is intended for people who
  216.          want to get started with Anarkey immediately.  Subsequent
  217.          chapters describe all of Anarkey's functions in complete
  218.          detail.
  219.  
  220.          Quick-Start Tutorial
  221.  
  222.          Anarkey supplies a multitude of functions which transforms
  223.          the dreary and tedious task of entering DOS commands into a
  224.          quick and enjoyable process.  It is not necessary to
  225.          understand all of Anarkey's powers before using it.  This
  226.          tutorial gets you started using the basic Anarkey features
  227.          immediately.  As you become familiar with these functions,
  228.          additional information can be found in subsequent chapters
  229.          of the manual.
  230.  
  231.          First, install Anarkey by executing the ANARKEY.COM program.
  232.          This causes a sign-on message to appear, after which Anarkey
  233.          installs itself and terminates.  You will be sitting at a
  234.          new and empty command prompt where everything appears
  235.          normal, however, Anarkey's features are now available for
  236.          your use.
  237.  
  238.          The first Anarkey feature we will learn is its line-editing
  239.          capability.  Anarkey lets you place the cursor anywhere
  240.          within the input line and enter or delete characters.  If
  241.          you have ever used a word processor, Anarkey's line-editing
  242.          feature will already be familiar.
  243.  
  244.          To demonstrate, enter the following line at the command
  245.          prompt.  The underscore character represents the cursor
  246.          position.
  247.  
  248.  
  249.                 echo Anarchy knows what you want_
  250.  
  251.  
  252.          The word "Anarchy" can be changed to "Anarkey" by pressing
  253.          the <Left> arrow key to move the cursor until it is beneath
  254.          the letter 'c' in "Anarchy."  Notice that moving the cursor
  255.          within the line does not modify the line in any way.
  256.          Similar to the <Left> key, the <Right> arrow key moves the
  257.          cursor toward the right, <Home> positions the cursor beneath
  258.          the line's first character and <End> moves the cursor to the
  259.          end of the line.  The input line with the repositioned
  260.          cursor now looks like this.
  261.  
  262.  
  263.                 echo Anarchy knows what you want
  264.  
  265.  
  266.          When a character is typed, it is either inserted into the
  267.          line or it overwrites the current character.  When a
  268.          character is inserted, any characters to the right of the
  269.          cursor are shifted to make room for the new character.  When
  270.          a character is overwritten, the new character replaces the
  271.          character at the cursor position; no shift occurs.
  272.  
  273.          Whether a character is inserted or overwritten depends upon
  274.          Anarkey's input mode.  When in insert mode, typed characters
  275.          are inserted into the line; in overwrite mode, character are
  276.          overwritten.  When first installed, Anarkey is in insert
  277.          mode.
  278.  
  279.          You can toggle between insert and overwrite modes by
  280.          pressing <Ins>.  Notice the cursor shape changes depending
  281.          upon the current mode.  The insert-mode cursor is an
  282.          underscore while overwrite mode uses a block cursor.
  283.  
  284.          Get back into insert mode and type the two characters "ke."
  285.          Anarkey inserts them into the line so that it now looks like
  286.          that shown below.  Notice the cursor has remained under the
  287.          letter 'c'.
  288.  
  289.  
  290.                 echo Anarkechy knows what you want
  291.  
  292.  
  293.          Characters are easily deleted from lines using any of
  294.          several functions.  The <Del> key removes the character
  295.          above the cursor and shifts any trailing characters to fill
  296.          the vacated space.  The <Backspace> key deletes the
  297.          character to the left of the cursor and moves the cursor
  298.          left one space.  The <Esc> key erases the entire line.
  299.  
  300.          Press the <Del> key twice to remove the unwanted characters
  301.          in our sample line.  The final edited line looks like this.
  302.  
  303.  
  304.                 echo Anarkey knows what you want
  305.  
  306.  
  307.          Press the <Enter> key to accept the line and execute it.
  308.          Anarkey saves all executed lines.  You can view all the
  309.          lines Anarkey has saved by pressing <F4>.  Execute the
  310.          following lines and press <F4> to verify that Anarkey has
  311.          saved them.
  312.  
  313.  
  314.                 dir *.*
  315.                 type read.me
  316.                 dir \*.bat
  317.  
  318.  
  319.          Once a line has been saved, it can be retrieved so you won't
  320.          have to retype it.  Pressing the <Up> and <Down> arrow keys
  321.          "walks" you through the list of saved lines.  Once
  322.          retrieved, a line can be edited using the line-edit
  323.          functions.
  324.  
  325.          You can display a full-screen window containing the list of
  326.          the saved commands by pressing <Alt-F4>.  (Make sure
  327.          ANARKMD.EXE is stored somewhere along your PATH variable
  328.          before doing this.)  Notice that one line in the window is
  329.          highlighted in reverse video.  This line is called the
  330.          current line.  Pressing the <Up> and <Down> keys makes other
  331.          lines in the window the current line.  If the entire list
  332.          cannot fit in the window, the <PgUp> and <PgDn> keys scroll
  333.          the window's contents.  If a mouse is installed, it can also
  334.          be used to change the current line and scroll the window's
  335.          contents.  Pressing the <Enter> key selects the current
  336.          line.  When a line is selected, the window closes and the
  337.          chosen line is entered onto the input line.
  338.  
  339.          Perhaps the fastest way to retrieve a command is to use
  340.          Anarkey's command completion feature.  Start with an empty
  341.          command line and enter the first character of the line you
  342.          wish to retrieve.  Then press the <Tab> key (also known as
  343.          the MegaKey).  Anarkey searches the list of saved commands
  344.          until it finds one that starts with the same character you
  345.          entered.  The remainder of the line is then copied onto the
  346.          input line.  You can try this yourself by entering the 'e'
  347.          from our sample input line and pressing <Tab>.  Anarkey
  348.          retrieves the remainder of the saved "echo" command and
  349.          enters it on the input line.  If by some chance Anarkey
  350.          completed the line in some undesired manner (in other words,
  351.          it did not retrieve the desired line), simply press the
  352.          <Tab> key again.
  353.  
  354.          Besides completing commands, the <Tab> key can also complete
  355.          directory and file names.  When you press <Tab>, Anarkey is
  356.          intelligent enough to know whether you want to retrieve a
  357.          command, as previously described, or complete a file name
  358.          and it acts appropriately.
  359.  
  360.          As an example of completing a directory name, say we wish to
  361.          enter the command "cd\global."  Type the following
  362.          characters on the input line and press <Tab>.
  363.  
  364.  
  365.                 cd\g_
  366.  
  367.  
  368.          Assuming a directory named "global" existed, Anarkey
  369.          completes it for us.  Similar to command completion, Anarkey
  370.          uses the first character of the name when searching for a
  371.          completion.  Thus, it would look for a directory starting
  372.          with the letter 'g.'  If more than one directory began with
  373.          a 'g,' Anarkey may select the "wrong" name.  If so, simply
  374.          press <Tab> again to cycle through the list of possible
  375.          completions.
  376.  
  377.          So far, all our examples show you entering only the first
  378.          character of the item to complete.  However, you can enter
  379.          as many characters as you wish.  Often a single character is
  380.          all that will be needed for Anarkey to complete the rest.
  381.          However, staying with our directory-completion example, say
  382.          a large number of directories happened to begin with the
  383.          letter 'g.'  Cycling through them all may take more
  384.          keystrokes than simply typing the name in manually.
  385.          Instead, enter additional characters on the input line to
  386.          narrow Anarkey's search to a smaller number of possible
  387.          completions.  For example, if "gl" is entered on the sample
  388.          input line, Anarkey searches only for directories that begin
  389.          with the letters "gl."  This technique can also be used for
  390.          command completions and all the other completion operations
  391.          Anarkey provides.
  392.  
  393.          Besides completing directory names, Anarkey also completes
  394.          the names of programs and other file types.  When completing
  395.          a program name which is to be executed, Anarkey does not
  396.          enter the file extension (.BAT, .EXE or .COM) on the input
  397.          line, just as you would not enter it if typing the name
  398.          yourself.
  399.  
  400.          Anarkey can easily retrieve the setting of an environment
  401.          variable for you.  First type the "SET" command followed one
  402.          or more characters of the variable's name.  Then press
  403.          <Tab>.  Anarkey completes the name and enters the variable's
  404.          setting on the input line.  You can then edit the setting,
  405.          for instance, by adding a new directory to the PATH.  (You
  406.          don't need to type the SET command to retrieve the PATH or
  407.          PROMPT settings, but Anarkey cannot complete their names for
  408.          you if you don't.  Check Chapter 8 for further details on
  409.          this topic.)
  410.  
  411.          You may have noticed that much of this tutorial kept
  412.          repeating a single lesson.  That lesson was: If you want to
  413.          enter something on the input line, press the <Tab> key;
  414.          Anarkey figures out what you want and does it automatically.
  415.          In other words, Anarkey knows what you want and gives it to
  416.          you.  This capability is what makes Anarkey an intelligent
  417.          command-line editor.
  418.  
  419.          Using the basic features outlined in this tutorial, you can
  420.          begin to use Anarkey productively right now.  But be aware
  421.          this section barely touched the surface of Anarkey's full
  422.          capabilities.  Much more is available and is as easy to
  423.          learn and use as the functions just described.  If you are
  424.          interested, complete details are provided in the forthcoming
  425.          chapters.
  426.  
  427.  
  428.  
  429.          Chapter 2
  430.  
  431.          The Pop-Up Help Window
  432.  
  433.          Anarkey adds many new features to the standard DOS command
  434.          prompt.  When you are first learning Anarkey, the provided
  435.          functions and key assignments will not yet be committed to
  436.          memory.  Even after you become comfortable with Anarkey,
  437.          there will probably be some operations that you will use
  438.          only occasionally and whose keystrokes you will not
  439.          immediately remember.  To assist you during these times,
  440.          Anarkey supports a pop-up help window which lists all of the
  441.          supported functions and their respective key assignments. 
  442.  
  443.          The help window can be popped-up by pressing <Alt-F1> or
  444.          <Alt-H> whenever Anarkey is active, for example, at the DOS
  445.          command prompt.  Before you pop-up the window, make sure the
  446.          Anarkmd program (in the file ANARKMD.EXE) is in either the
  447.          current directory or a directory specified in the PATH
  448.          environment variable.  After pressing the help key, a
  449.          full-screen window will be displayed containing a list of
  450.          Anarkey functions and their current key assignments.
  451.  
  452.          Note: The reason Anarkmd must be in the current directory or
  453.          along the PATH is because it actually performs the entire
  454.          pop-up window operation.  Anarkey simply executes Anarkmd,
  455.          telling it to display the help window.  But all this is
  456.          performed automatically in the background and you do not
  457.          need to worry about it.
  458.  
  459.          The information displayed in the window is actually read
  460.          from a standard text file just before the window pops up.
  461.          By reading and displaying a separate text file, Anarkey
  462.          saves precious DOS memory by not keeping the help
  463.          information resident.  It also provides great flexibility in
  464.          the content and format of the displayed help information.
  465.          In other words, you can modify the help text file to your
  466.          heart's desire, even include help information about other
  467.          programs if you wish.  The only restrictions that apply are:
  468.          (1) the file cannot exceed 65,000 characters in size and (2)
  469.          the file may not contain more than 1000 lines of text.
  470.  
  471.          Since a text file must be loaded to gather the help
  472.          information, Anarkey must be informed of the help file's
  473.          name.  Anarkey first looks for the file name in an
  474.          environment variable called "HELP@."  If HELP@ is defined,
  475.          it should specify the drive, directory and filename of the
  476.          help file.  For example, 
  477.  
  478.  
  479.                 SET HELP@=c:\anarkey\anarkey.hlp
  480.  
  481.  
  482.          If HELP@ is not defined, Anarkey assumes the helpfile's name
  483.          is ANARKEY.SUM and will attempt to locate a file with that
  484.          name.  ANARKEY.SUM is a text file distributed with Anarkey
  485.          which contains a list of Anarkey functions and their default
  486.          key assignments.  ANARKEY.SUM can also be updated by
  487.          Anarked, the Anarkey Keystroke Editor, if you modify any of
  488.          the default key assignments.  Anarked is explained in
  489.          Chapter 13.
  490.  
  491.          Depending upon which version of DOS you are running, Anarkey
  492.          will search for the ANARKEY.SUM file in two locations.
  493.          First, if running under DOS version 3.0 or later, Anarkey
  494.          searches for ANARKEY.SUM in the same directory in which
  495.          Anarkmd is located, also called the home directory.  Under
  496.          versions of DOS prior to 3.0, Anarkey does not check this
  497.          location.
  498.  
  499.          If the ANARKEY.SUM file is still not found, Anarkey looks
  500.          for it in the current directory.
  501.  
  502.          These search steps and the order in which they are performed
  503.          are outlined below:
  504.  
  505.  
  506.                  1) File specified in HELP@ environment variable
  507.  
  508.                  2) ANARKEY.SUM in Anarkmd home directory (DOS 3.0+
  509.                     only)
  510.  
  511.                  3) ANARKEY.SUM in current directory
  512.  
  513.  
  514.          If all attempts to locate the help file fail, Anarkey
  515.          displays an error message ("Help file not found") and ends
  516.          the help operation. Otherwise, the help file is loaded and
  517.          displayed in the pop-up window.
  518.  
  519.          With the help window displayed, the following keystrokes are
  520.          recognized and acted upon:
  521.  
  522.  
  523.                  <F1>            -- Display help for pop-up window
  524.                  <Esc>           -- Exit the help window
  525.                  <Enter>         -- Same as <Esc> key
  526.                  <Up>            -- Scroll the window contents up one
  527.                                     line
  528.                  <Down>          -- Scroll the window contents down
  529.                                     one line
  530.                  <PgUp>          -- Scroll the window contents up one
  531.                                     page
  532.                  <PgDn>          -- Scroll the window contents down
  533.                                     one page
  534.                  <Home>          -- View top of help file
  535.                  <End>           -- View bottom of help file
  536.  
  537.  
  538.          In addition to keystroke input, if a mouse is installed on
  539.          the computer, it can be used to scroll through the help
  540.          window.  Anarkey supports the Microsoft and any
  541.          Microsoft-compatible mouse.
  542.  
  543.          With the mouse installed, a separate mouse cursor is
  544.          displayed in the middle of the window in the form of a solid
  545.          block character.  By moving the mouse, the mouse cursor can
  546.          be moved anywhere on the screen.
  547.  
  548.          Scrolling operations are performed with the mouse by moving
  549.          the mouse cursor to specific locations in the window and
  550.          clicking (pressing and releasing) the left mouse button.
  551.          For example, you can position the mouse cursor anywhere over
  552.          the "Press F1 for help" message in the upper right corner of
  553.          the window and click the left mouse button.  This will have
  554.          the same effect as pressing <F1> in that it will display an
  555.          additional help screen.  Pressing either mouse button will
  556.          clear this secondary help window.
  557.  
  558.          On the far right edge of the help window is a scroll bar.
  559.          The scroll bar is actually composed of four separate
  560.          sections.  At the very top of the bar is a single-character
  561.          up-arrow.  To scroll the window contents up one line,
  562.          position the mouse cursor on this arrow and click the mouse
  563.          button.  A down-arrow is located at the very bottom of the
  564.          scroll bar.  Click on it to scroll the window contents down
  565.          one line.  The remainder of the scroll bar is divided into
  566.          two equal halves.  Click on the top half to scroll the
  567.          window up one page; click on the bottom half to scroll down
  568.          one page.  You can also press and hold the mouse button with
  569.          the mouse cursor positioned at any of these locations.
  570.          Doing so is the same as repeatedly clicking on the item.
  571.  
  572.          To clear the help window, click the right mouse button.
  573.  
  574.          After exiting the help screen, you will be returned to the
  575.          DOS command prompt.  Any characters entered at the prompt
  576.          when the help window was popped-up will still exist.
  577.  
  578.          The mouse movements described in this chapter are also
  579.          applicable to the other pop-up windows that Anarkey
  580.          supports.  These other windows are discussed in future
  581.          chapters.
  582.  
  583.          Anarkey also supports an alternative mouse interface in case
  584.          you don't like the interface described in this chapter.  The
  585.          alternative mouse interface is described in Appendix I.
  586.  
  587.  
  588.          Chapter 3
  589.  
  590.          Editing the Command Line
  591.  
  592.          Anarkey provides line editing functions commonly found in
  593.          word processing programs.  These functions include general
  594.          editing, cursor movement, character deletion and character
  595.          retrieval features.
  596.  
  597.          One note of interest should be mentioned here.  Most of the
  598.          keystroke assignments listed in the remainder of this manual
  599.          are configurable.  If you don't like some default key
  600.          assignment, Anarked, the Anarkey Keystroke Utility, can be
  601.          used to reassign it to a key more to your liking.  Anarked
  602.          is described in detail in Chapter 13.  Refer to it for
  603.          complete details.  In this manual, only the default key
  604.          assignments will be mentioned.
  605.  
  606.          General Editing
  607.  
  608.          Pressing the <Enter> key accepts the input line.  This
  609.          usually means that the line is passed to the command
  610.          processor for execution.  The entire line is always
  611.          accepted, regardless of the cursor's position in the line.
  612.  
  613.          Before Anarkey passes the line to the command processor, it
  614.          performs some checks and optional processing on the line
  615.          itself.  For example, Anarkey will break the line into
  616.          separate commands.  (You will see shortly that Anarkey
  617.          allows you to specify multiple commands on a single input
  618.          line.)
  619.  
  620.          It also checks the length of each command to verify that its
  621.          length is within the allowable range.  If a command is too
  622.          long, Anarkey does not accept the input line.  Instead, it
  623.          positions the cursor under the first character that extends
  624.          beyond the length limit and allows you to modify the line
  625.          further.  After the line's length has been adjusted, you can
  626.          press <Enter> to accept the line again.
  627.  
  628.          Anarkey supports two input modes: insert and overwrite.
  629.          When editing in insert mode, typed characters are inserted
  630.          into the input line; any characters to the right of the
  631.          inserted character are shifted right to make room.  In
  632.          overwrite mode, typed characters write over any existing
  633.          character at the cursor position; no shifting of characters
  634.          occurs as in insert mode.
  635.  
  636.          The <Ins> key toggles Anarkey between these two input modes.
  637.          By default, Anarkey begins in insert mode.  If you prefer
  638.          Anarkey to start in overwrite mode, you can specify the -I
  639.          option on the Anarkey command line when it is installed.
  640.          Refer to Chapter 11 for more information on Anarkey
  641.          command-line options.
  642.  
  643.          The current input mode is indicated by the cursor's shape.
  644.          The power-up input mode uses an underscore cursor; the
  645.          alternate mode uses a block cursor.  For example, if Anarkey
  646.          begins in its default insert mode, the cursor is an
  647.          underscore whenever insert mode is active.  On the other
  648.          hand, if you use the -I option to change the power-up mode
  649.          to overwrite then an underscore cursor is used whenever
  650.          Anarkey is in overwrite mode.  The relationship between
  651.          input mode and cursor shape is further illustrated in the
  652.          following table:
  653.  
  654.  
  655.                  Power-up mode = Insert (default and -II option)
  656.                          Insert mode cursor      = Underscore
  657.                          Overwrite mode cursor   = Block
  658.  
  659.                  Power-up mode = Overwrite (-IO option)
  660.                          Insert mode cursor      = Block
  661.                          Overwrite mode cursor   = Underscore
  662.  
  663.  
  664.          If you prefer that Anarkey never alter the cursor's shape,
  665.          install it with the -C option.  Anarkey can also display a
  666.          non-blinking cursor if the -CN option is used.  And if the
  667.          normal underscore cursor does not show up well on your
  668.          monitor, use the -CT option to use a thick underscore
  669.          cursor.  Refer to Chapter 11 for details on these and other
  670.          options.
  671.  
  672.          Anarkey remains in a particular input mode until it is
  673.          explicitly told to toggle to the other mode via a press of
  674.          the <Ins> key.  However, you may prefer that Anarkey always
  675.          begin a new input line in a particular mode.  Anarkey can be
  676.          forced into a particular input mode at the start of each new
  677.          line by including the -I option on the installation command
  678.          line.  Again, refer to Chapter 11 for complete details.
  679.  
  680.          As you will quickly learn, Anarkey supports a lot of
  681.          features.  Many of these features are invoked by pressing a
  682.          key.  Situations may occur where you wish to enter a certain
  683.          key onto the input line, but pressing the key instead
  684.          executes an Anarkey function.  For example, say you wish to
  685.          enter an ANSI escape sequence onto the input line.  As you
  686.          may know, this would entail typing an <Esc> character
  687.          followed by several other characters.  However, pressing
  688.          <Esc> normally instructs Anarkey to clear the entire input
  689.          line (as will be described shortly).  Is there a way to
  690.          bypass Anarkey's key processing and enter a keystroke
  691.          directly onto the input line?
  692.  
  693.          The answer to the above question is "yes" and you do it by
  694.          immediately preceding the key by pressing <Ctrl-U>.  The key
  695.          pressed immediately after <Ctrl-U> is entered directly onto
  696.          the input line.  Therefore, to enter an <Esc> onto the input
  697.          line, press <Ctrl-U><Esc>.  The <Ctrl-U> keystroke tells
  698.          Anarkey to enter the next keystroke "unmodified," in other
  699.          words, to skip any interpretation it would normally perform
  700.          on the key.  If you want to enter a <Ctrl-U> on the line,
  701.          simply press <Ctrl-U> twice in succession.
  702.  
  703.          In summary, the general editing keystrokes discussed in this
  704.          section were:
  705.  
  706.  
  707.                  <Enter>         Accept input line
  708.                  <Ins>           Toggle input mode
  709.                  <Ctrl-U>        Enter next keystroke unmodified
  710.  
  711.  
  712.          Moving the Cursor
  713.  
  714.          Anarkey allows the cursor to be placed anywhere on the input
  715.          line.  Thus, you can move the cursor to the beginning or
  716.          middle of a line and modify just a few characters without
  717.          backspacing and deleting any trailing portion.
  718.  
  719.          The cursor is positioned within the line by cursor-movement
  720.          keystrokes.  Each cursor-movement keystroke is outlined and
  721.          described in the following table.
  722.  
  723.  
  724.                  <Home>          Move cursor to start of line
  725.                  <End>           Move cursor to end of line
  726.                  <Right>         Move cursor right one character
  727.                  <Left>          Move cursor left one character
  728.                  <Ctrl-Right>    Move cursor right one word
  729.                  <Ctrl-Left>     Move cursor left one word
  730.  
  731.  
  732.          None of the cursor-movement keys alter the contents of the
  733.          input line.  After the cursor is positioned to its desired
  734.          location, additional modifications, such as inserting or
  735.          deleting characters, can be performed.
  736.  
  737.          Deleting  Characters
  738.  
  739.          Anarkey also supports functions to remove one or more
  740.          characters from an input line.  They are all listed in the
  741.          table below.
  742.  
  743.  
  744.                  <Backspace>     Delete character to left of cursor
  745.                  <Del>           Delete character above cursor
  746.                  <Ctrl-T>        Delete word to right of cursor
  747.                  <Ctrl-End>      Delete to end of line
  748.                  <Esc>           Delete line
  749.  
  750.  
  751.          If Anarkey is in insert mode, removal of a character causes
  752.          any trailing characters on the line to shift over to fill
  753.          the vacated space.
  754.  
  755.          The cursor position moves whenever the <Backspace> or <Esc>
  756.          keys are pressed.  <Backspace> moves the cursor left one
  757.          character and <Esc> places the cursor at the start of the
  758.          empty line.  All the other character-deletion keys have no
  759.          effect on the cursor position.
  760.  
  761.          Retrieving Characters
  762.  
  763.          One of Anarkey's strongest features is its ability to
  764.          retrieve command lines previously entered.  That topic is
  765.          discussed in detail in the next chapter.  In addition to
  766.          that powerful new feature, Anarkey also supports two of the
  767.          original DOS functions that retrieve individual characters
  768.          and an enhanced version of one of those functions.  These
  769.          three operations are listed in the following table.
  770.  
  771.  
  772.                  <F1>            Retrieve character from previous line
  773.                  <F3>            Retrieve remainder of previous line
  774.                  <Alt-F3>        Retrieve remainder of previous line
  775.                                  and accept line
  776.  
  777.  
  778.          The <F1> and <F3> keys provide identical services to those
  779.          offered in the original DOS editing functions.  <Alt-F3> in
  780.          an enhanced version of <F3> in that it immediately accepts
  781.          the input line following the character retrieval operation.
  782.          <Alt-F3> is the equivalent of typing <F3><Enter>.
  783.  
  784.          Summary
  785.  
  786.          The following line-editing functions were described in this
  787.          chapter.
  788.  
  789.  
  790.                  <Enter>         Accept input line
  791.                  <Ins>           Toggle input mode
  792.                  <Ctrl-U>        Enter next keystroke unmodified
  793.                  <Home>          Move cursor to start of line
  794.                  <End>           Move cursor to end of line
  795.                  <Right>         Move cursor right one character
  796.                  <Left>          Move cursor left one character
  797.                  <Ctrl-Right>    Move cursor right one word
  798.                  <Ctrl-Left>     Move cursor left one word
  799.                  <Backspace>     Delete character to left of cursor
  800.                  <Del>           Delete character above cursor
  801.                  <Ctrl-T>        Delete word to right of cursor
  802.                  <Ctrl-End>      Delete to end of line
  803.                  <Esc>           Delete line
  804.                  <F1>            Retrieve character from previous line
  805.                  <F3>            Retrieve remainder of previous line
  806.                  <Alt-F3>        Retrieve remainder of previous line
  807.                                  and accept line
  808.  
  809.  
  810.          Chapter 4
  811.  
  812.          The History Buffer
  813.  
  814.          Anarkey saves all entered input lines in a storage area
  815.          called the history buffer.  Keystroke functions are provided
  816.          to retrieve lines from the buffer, saving you from having to
  817.          type them again.  This is one of Anarkey's most powerful
  818.          features.  Also provided are functions to manuever through
  819.          the buffer and control which lines get saved in it.  Each of
  820.          these operations are discussed in this chapter.
  821.  
  822.          When Anarkey is first installed, the history buffer is
  823.          empty.  When the first input line is accepted (i.e. you
  824.          press <Enter>), it is stored at the very top of the buffer.
  825.          Subsequent input lines are stored in the buffer, one after
  826.          the other, from the top of the buffer to the bottom.  Empty
  827.          lines are not saved in the history buffer.  Lines composed
  828.          of multiple commands are stored in the history buffer as a
  829.          single line.  (Entering multiple commands on a line is
  830.          discussed in Chapter 7.)
  831.  
  832.          A history buffer with several lines stored in it is depicted
  833.          below.
  834.  
  835.  
  836.                 rem This is line one
  837.                 rem This is line two
  838.                 rem Here is the third line
  839.                 rem This is the last line in the buffer
  840.  
  841.  
  842.  
  843.          When the history buffer is full and you enter a new input
  844.          line, the line stored at the top of the history buffer is
  845.          removed to make room for the new line.  You can think of
  846.          this action as being similar to lines scrolling off the top
  847.          of a display screen.
  848.  
  849.          The number of lines the history buffer can hold depends upon
  850.          the line length and the buffer size.  By default, the
  851.          history buffer will hold 500 characters.  However, this can
  852.          be configured to any value from 255 to 50,000 via the -H
  853.          command-line option.  (Refer to Chapter 11 for details.)
  854.  
  855.          The lines stored in the history buffer can be viewed at any
  856.          time by pressing <F4>.  Lines are output to the screen
  857.          starting with the first line in the buffer and proceeding
  858.          down to the last line.  When an entire screen's worth of
  859.          lines has been displayed, output pauses.  You can press any
  860.          key to display the next screenful of lines.
  861.  
  862.          If you prefer to view the history buffer from the bottom to
  863.          the top (that is, from the newest line to the oldest), press
  864.          the <Alt-F4> key.  This is identical to <F4> except the
  865.          order in which lines are displayed is from the last line in
  866.          the buffer up to the first.
  867.  
  868.          Line Retrieval
  869.  
  870.          At any given time, one line in the history buffer is
  871.          designated as the current buffer line or CBL.  The CBL is a
  872.          very important concept for you to understand.  By moving the
  873.          CBL through the history buffer, in other words, by making a
  874.          different buffer line the current line, is one method
  875.          Anarkey provides to retrieve lines from the buffer.
  876.  
  877.          The following diagram depicts a sample history buffer with
  878.          the CBL "pointing" to the last line in the buffer.  The last
  879.          line in the history buffer is always a blank line.  When you
  880.          begin entering a new line, the CBL is always set to the
  881.          last, empty line in the buffer.
  882.  
  883.  
  884.                 copy *.* a:
  885.                 dir a:
  886.                 del *.txt
  887.                 md temp
  888.          CBL ->
  889.  
  890.  
  891.          You can move the CBL, in other words, make a different
  892.          buffer line current, by pressing the <Up> or <Down> arrow
  893.          keys.  If the CBL is at the last line in the buffer and the
  894.          <Down> key is press, the CBL circles back up to the top of
  895.          the buffer.  Similarly, with the CBL at the first line in
  896.          the buffer, pressing <Up> will cycle you back to the last,
  897.          empty buffer line.
  898.  
  899.          Moving the CBL is extremely useful.  When you move the CBL,
  900.          the new current buffer line is retrieved from the history
  901.          buffer and entered onto the input line.  Any characters that
  902.          existed on the input line at the time of the <Up> or <Down>
  903.          keypress are erased prior to retrieving the buffer line.
  904.  
  905.          For example, pressing the <Up> arrow key with the buffer
  906.          status shown above, moves the CBL up to the previous line
  907.          ("md temp"), retrieves that line from the buffer and places
  908.          it on the input line.  The new buffer status with updated
  909.          CBL is shown in the following diagram.
  910.  
  911.  
  912.                 copy *.* a:
  913.                 dir a:
  914.                 del *.txt
  915.          CBL -> md temp
  916.  
  917.  
  918.          The <Up> and <Down> keys can be pressed repeatedly to
  919.          sequentially walk through the entire buffer.  Once the
  920.          desired line is retrieved from the buffer, you can use any
  921.          of Anarkey's line-editing functions to modify the line
  922.          before accepting it.
  923.  
  924.          After retrieving a line, if you immediately accept it by
  925.          pressing <Enter>, Anarkey moves the retrieved line from its
  926.          location in the history buffer down to the end of the
  927.          buffer.  This action prevents the buffer from being filled
  928.          with a bunch of duplicate lines.
  929.  
  930.          To demonstrate the move operation, assume the CBL has been
  931.          positioned in the history buffer as shown in the following
  932.          diagram.
  933.  
  934.  
  935.                 copy *.* a:
  936.          CBL -> dir a:
  937.                 del *.txt
  938.                 md temp
  939.  
  940.  
  941.          With the "dir a:" command retrieved, <Enter> is immediately
  942.          pressed to accept the line unmodified.  This causes the CBL
  943.          to be moved to the end of the buffer.  At the next input
  944.          prompt, the new buffer status will be that shown below.
  945.  
  946.  
  947.                 copy *.* a:
  948.                 del *.txt
  949.                 md temp
  950.                 dir a:
  951.          CBL ->
  952.  
  953.  
  954.          Notice the "dir a:" command was moved from its old location
  955.          in the buffer down to the end.
  956.  
  957.          If you prefer that Anarkey maintain a complete log of the
  958.          commands you execute in the exact order in which they are
  959.          entered, you can turn off this move operation by specifying
  960.          the -F option when installing Anarkey.  Refer to Chapter 12
  961.          for further details.
  962.  
  963.          Situations may occur where you wish to retrieve two or more
  964.          lines stored consecutively in the history buffer.  For
  965.          example, after retrieving the "dir a:" command as we've just
  966.          done, say we also want to retrieve the line that followed it
  967.          in the buffer, "del *.txt."  Of course, we can use the <Up>
  968.          and <Down> keys again, but that is not necessary.  Also, if
  969.          there existed a large number of lines in the history buffer,
  970.          it may take a long time to get to the line we want.  There
  971.          is an easier way.
  972.  
  973.          Anarkey maintains an internal record of the buffer position
  974.          of the last retrieved line.  The CBL can be moved to this
  975.          saved position by pressing the <PgDn> key.  Moving the CBL
  976.          to the next line in the buffer also retrieves that line and
  977.          enters it onto the input line.  Thus, continuing with our
  978.          previous example, after pressing <PgDn>, the buffer status
  979.          will be that shown below.
  980.  
  981.  
  982.                 copy *.* a:
  983.          CBL -> del *.txt
  984.                 md temp
  985.                 dir a:
  986.  
  987.  
  988.          The effect is as though you had repeatedly pressed the <Up>
  989.          key to move the CBL, however, by using <PgDn> instead you
  990.          have entered far fewer keystrokes.
  991.  
  992.          The CBL can be restored to this saved position only one time
  993.          per input line.  Subsequent <PgDn> keystrokes are equivalent
  994.          to pressing the <Down> key.
  995.  
  996.          Line Completion
  997.  
  998.          In actual practice, the number of lines stored in the
  999.          history buffer can be quite large.  Having to walk past each
  1000.          line sequentially in order to get to the desired one can be
  1001.          more work than retyping it.
  1002.  
  1003.          For such cases, Anarkey provides a command completion
  1004.          function.  Simply type one or more characters on the input
  1005.          line and press the <F5> or <Ctrl-K> key.  Anarkey will
  1006.          search the history buffer for a saved command that starts
  1007.          with the same character(s).  When it finds one, Anarkey
  1008.          retrieves the line and enters it on the input line, in
  1009.          effect completing the command for you.  If the completed
  1010.          command is not the one you want, press <F5> or <Ctrl-K>
  1011.          again and Anarkey will pick up where it left off and
  1012.          continue the search.
  1013.  
  1014.          When Anarkey searches for a command completion, it always
  1015.          begins the search at the CBL and works up toward the top of
  1016.          the buffer.  When it finds a completion, it sets the CBL to
  1017.          the matching line and retrieves the line.  If the top of the
  1018.          buffer is reached without finding a completion (or all the
  1019.          completions have been retrieved), Anarkey beeps the speaker
  1020.          and sets the CBL to the bottom of the buffer.  Pressing <F5>
  1021.          at this point will begin the completion operation again,
  1022.          cycling through the history buffer another time.
  1023.  
  1024.          If the command completion operation is invoked with an empty
  1025.          input line, Anarkey will retrieve the previous buffer line.
  1026.          This is identical to pressing the <Up> key.
  1027.  
  1028.          As an example of how command completion works, assume the
  1029.          following history buffer:
  1030.  
  1031.  
  1032.                 copy *.* a:
  1033.                 del *.txt
  1034.                 md temp
  1035.                 cd temp
  1036.                 dir a:
  1037.                 xcopy a: b:
  1038.                 mode mono
  1039.          CBL ->
  1040.  
  1041.  
  1042.          Say we wish to retrieve the "del *.txt" command using
  1043.          command completion.  Enter into an empty input line the
  1044.          single character "d" and press <F5> or <Ctrl-K>.  Anarkey
  1045.          will search from the CBL toward the top of the buffer until
  1046.          it discovers a line that starts with the letter "d."  When
  1047.          it finds the line "dir a:" it will stop searching, set the
  1048.          CBL to the line and retrieve it by entering it on the input
  1049.          line.  The buffer status is now that shown in the diagram
  1050.          below.
  1051.  
  1052.  
  1053.                 copy *.* a:
  1054.                 del *.txt
  1055.                 md temp
  1056.                 cd temp
  1057.          CBL -> dir a:
  1058.                 xcopy a: b:
  1059.                 mode mono
  1060.  
  1061.  
  1062.          However, we did not want the "dir a:" command.  Therefore,
  1063.          press the <F5> key again to get Anarkey to continue its
  1064.          search.  This time it finds the "del *.txt" command and
  1065.          retrieves it, completing the desired command for us.  We can
  1066.          now edit the line further or simply accept it by pressing
  1067.          <Enter>.  The final buffer status will be:
  1068.  
  1069.  
  1070.                 copy *.* a:
  1071.          CBL -> del *.txt
  1072.                 md temp
  1073.                 cd temp
  1074.                 dir a:
  1075.                 xcopy a: b:
  1076.                 mode mono
  1077.  
  1078.  
  1079.          Alternatively, we could have entered the first two
  1080.          characters of the desired command, "de," before beginning
  1081.          the search.  If we had, Anarkey would never have matched the
  1082.          "dir a:" command and, instead would have gone right to the
  1083.          line we wanted.
  1084.  
  1085.          At any time during a command completion operation, you can
  1086.          add more characters to the input line to narrow the search.
  1087.          Assume that after entering the single character "d" in our
  1088.          example and found an undesired completion, we realized there
  1089.          were a large number of lines stored in the buffer that began
  1090.          with that letter.  Rather than retrieve each one, simply
  1091.          enter one or more additional characters onto the input line.
  1092.          The command completion operation does not move the cursor
  1093.          position, therefore, the cursor will still be after the
  1094.          initial "d" we entered.  Type one or more characters onto
  1095.          the line and continue the search by pressing <F5>.  This
  1096.          will narrow down the number of matching completions and
  1097.          retrieve the desired line sooner.  In most cases, entering
  1098.          from one to three characters will be enough to narrow the
  1099.          number of completions to a very small number, allowing quick
  1100.          retrieval.
  1101.  
  1102.          The command completion function has a close cousin.  The
  1103.          <F6> and <Ctrl-L> keys perform the same completion operation
  1104.          as <F5> and <Ctrl-K> except the retrieved line is
  1105.          immediately accepted.  If you are positive the line you wish
  1106.          completed will be the first (or next) one Anarkey will find,
  1107.          pressing <F6> or <Ctrl-L> will save you from having to hit
  1108.          <Enter>.  However, if you were wrong, it will be too late;
  1109.          the retrieved line will already be executing when you
  1110.          realize your error.  The <F6> and <Ctrl-L> keys allow you to
  1111.          really fly when working at the command prompt, executing
  1112.          long and complicated lines with a minimal number of
  1113.          keystrokes.  Just be careful you don't crash and burn.
  1114.  
  1115.          The History-Buffer Window
  1116.  
  1117.          If neither walking through the history buffer nor command
  1118.          completion are to your liking, Anarkey provides yet another
  1119.          method to retrieve lines from the history buffer.  Press
  1120.          <Alt-F5> or <Alt-K> and a full-screen window will pop-up
  1121.          that contains all the lines stored in the buffer.  If one or
  1122.          more characters are on the input line when you press the
  1123.          key, the window will contain only those lines from the
  1124.          buffer that could be used to complete the remainder of the
  1125.          line.
  1126.  
  1127.          Note: Before you pop-up the history-buffer window, be sure
  1128.          the Anarkmd program is available in either the current
  1129.          directory or a directory specified along the PATH
  1130.          environment variable.  Anarkey actually executes Anarkmd
  1131.          which then displays the pop-up window.  This saves a large
  1132.          amount of memory since the code to process the window is not
  1133.          required to be resident.
  1134.  
  1135.          From the history-buffer window, you can scroll through the
  1136.          buffer, select a line to retrieve or combine multiple
  1137.          commands to form a single line to enter on the input line.
  1138.          Each of these operations will be described, but if you ever
  1139.          need a reminder, you can always press the <F1> key to
  1140.          display a help window of recognized keystrokes.
  1141.  
  1142.          If the history buffer contains more lines than will fit in a
  1143.          single window, you can scroll through the buffer by using
  1144.          the keyboard or a mouse.  Navigating through the buffer
  1145.          window is identical to scrolling through the pop-up help
  1146.          window described in Chapter 2.  Refer back to it if you need
  1147.          to refresh your memory on this topic.
  1148.  
  1149.          One line in the history buffer window is always displayed in
  1150.          reverse video (i.e. black characters on a white background).
  1151.          This is the current line.  By using the <Up> or <Down> arrow
  1152.          keys, you can make the previous or next line in the window
  1153.          the current line.  Press the <Enter> key to select and
  1154.          retrieve the current line.  The pop-up window will clear and
  1155.          the selected line will be entered onto the input line.  A
  1156.          line can be selected with the mouse by placing the mouse
  1157.          cursor anywhere on the line and clicking the left button.
  1158.          If the left mouse button is double-clicked (clicked twice in
  1159.          rapid succession) the line is selected and immediately
  1160.          executed.
  1161.  
  1162.          The pop-up history buffer window provides one function not
  1163.          found in other Anarkey windows.  That function is the
  1164.          ability to combine two or more lines together to form a
  1165.          single line.  This single line can then be entered onto the
  1166.          input line automatically.  Combining lines saves you from
  1167.          having to retrieve each one individually; a single retrieval
  1168.          operation is all that's required.
  1169.  
  1170.          Entering multiple commands on a line is discussed in detail
  1171.          in Chapter 7.  However, to understand how they are
  1172.          constructed in the pop-up history window, all you need to
  1173.          know now is that each command must be separated by a
  1174.          semicolon(;).  For example, the following input line is
  1175.          composed of two commands, "cd \temp" and "dir."
  1176.  
  1177.  
  1178.                 cd \temp;dir
  1179.  
  1180.  
  1181.          When combining lines in the history buffer window, the
  1182.          semicolon character is placed in the line for you
  1183.          automatically.
  1184.  
  1185.          The process of combining lines entails selecting a line from
  1186.          the window.  However, before you press <Enter> or the left
  1187.          mouse button to make the selection, press and hold the
  1188.          <Ctrl> key (i.e. press either <Ctrl-Enter> or <Ctrl-Left
  1189.          Mouse Button).  This causes the line construction window to
  1190.          pop-up.
  1191.  
  1192.          The line construction window consists of one field area
  1193.          which contains the combined lines you have selected up to
  1194.          that point.  Additionally, there are four buttons along the
  1195.          bottom of the window.
  1196.  
  1197.          Each action that may be performed in the line construction
  1198.          window is represented by one of the buttons.  To perform an
  1199.          action, you select or push its associated button.  At all
  1200.          times, one button is displayed with a double-line frame.
  1201.          This is the current button.  Press the <Tab> or <Right>
  1202.          arrow key to make the next button current.  Press
  1203.          <Shift-Tab> or <Left> arrow to make the previous button
  1204.          current.  To push a button and perform its associated
  1205.          action, make it the current button and press <Enter>.  A
  1206.          mouse can also be used to push a button by placing the mouse
  1207.          cursor over it and clicking the left button.  Each button
  1208.          also has a hot-key character which is displayed in
  1209.          highlighted video.  You can press a button's hot-key to
  1210.          select or push the button.  If you ever need to be reminded
  1211.          of these keystrokes, press <F1> to display a
  1212.          context-sensitive help window.
  1213.  
  1214.          The Abort button terminates the line construction operation.
  1215.          Any combined line created up to that point will be cleared
  1216.          and control will return to the history buffer window.
  1217.  
  1218.          The Continue button returns control back to the history
  1219.          buffer window.  From here, you can select an additional line
  1220.          to append to the line being constructed.  To append a line
  1221.          to the previously-selected lines, be sure to press
  1222.          <Ctrl-Enter> or <Ctrl-Left Button> when you select the line.
  1223.          Pressing <Enter> or the left mouse button without holding
  1224.          the <Ctrl> key will retrieve that line only and not the
  1225.          combined line.
  1226.  
  1227.          The Accept and Edit button accepts the constructed line.
  1228.          All windows will clear and the line will be entered onto the
  1229.          input line for your editing edification.
  1230.  
  1231.          The Accept and Execute button is identical to Accept and
  1232.          Edit except the line is executed immediately.  Pushing the
  1233.          Accept and Execute button is the same as pressing Accept and
  1234.          Edit followed by <Enter>.
  1235.  
  1236.          Miscellaneous Operations
  1237.  
  1238.          In addition to retrieving lines from the history buffer,
  1239.          Anarkey provides several miscellaneous functions which
  1240.          effect the buffer.
  1241.  
  1242.          To store a line in the history buffer without executing it,
  1243.          accept the line by pressing <Ctrl-Enter>.  Be aware this
  1244.          function is only available at the DOS prompt and not in the
  1245.          history buffer window; in the window, <Ctrl-Enter> invokes a
  1246.          line-construction operation.
  1247.  
  1248.          Individual lines can be removed from the history buffer by
  1249.          first retrieving the line and then pressing <Ctrl-Z>.  In
  1250.          effect, the current buffer line (CBL) is deleted from the
  1251.          buffer.  When this occurs, the CBL will move to the next
  1252.          line in the buffer which is then retrieved and entered onto
  1253.          the input line.  Thus, <Ctrl-Z> can be pressed repeatedly to
  1254.          delete a group of consecutive lines from the buffer.
  1255.  
  1256.          The entire history buffer can be cleared by pressing
  1257.          <Ctrl-X>.
  1258.  
  1259.          Finally, the contents of the history buffer can be written
  1260.          to an ASCII text file by pressing <Ctrl-W>.  The Load
  1261.          program, discussed in Chapter 14, can then read this file to
  1262.          refill the buffer at a later time.  This function is useful
  1263.          for carrying over the history buffer contents from one
  1264.          computer session to another.
  1265.  
  1266.          When you press <Ctrl-W>, the history buffer is always
  1267.          written to a file called ANARKEY.LOG located in the root
  1268.          directory of the current drive.  If the file cannot be
  1269.          written because of a full disk, Anarkey beeps.  If you
  1270.          prefer the file be written to a different location or under
  1271.          another name, use the Anarkmd program to create the file.
  1272.          Refer to Chapter 16 for details on Anarkmd operation.
  1273.  
  1274.          Summary
  1275.  
  1276.          The line-retrieval functions discussed in this chapter are
  1277.          among Anarkey's biggest strengths.  If you take the time to
  1278.          become comfortable with them, you will be rewarded with a
  1279.          significant time savings.
  1280.  
  1281.          In summary, the functions and keystrokes discussed in this
  1282.          chapter are listed below.
  1283.  
  1284.  
  1285.                  <F4>            View history buffer (top to bottom)
  1286.                  <Alt-F4>        View history buffer (bottom to top)
  1287.                  <Up>            Retrieve previous buffer line
  1288.                  <Down>          Retrieve next buffer line
  1289.                  <PgDn>          Retrieve buffer line following last
  1290.                                  retrieved line
  1291.                  <F5>            Complete line
  1292.                  <Ctrl-K>        Same as <F5>
  1293.                  <F6>            Complete line and execute
  1294.                  <Ctrl-L>        Same as <F6>
  1295.                  <Alt-F5>        Display history-buffer window
  1296.                  <Alt-K>         Same as <Alt-F5>
  1297.                  <Ctrl-Enter>    Store line in history buffer, do not
  1298.                                  execute
  1299.                  <Ctrl-Z>        Remove current buffer line from
  1300.                                  history buffer
  1301.                  <Ctrl-X>        Clear history buffer
  1302.                  <Ctrl-W>        Write history buffer
  1303.  
  1304.  
  1305.  
  1306.          Chapter 5
  1307.  
  1308.          Anarkey AKAs
  1309.  
  1310.          There exist certain commands which you probably execute with
  1311.          great regularity.  The retrieval operations discussed in the
  1312.          previous chapter are extremely useful in reducing the number
  1313.          of times you have to type such lines.  In addition to
  1314.          retrieval functions, Anarkey provides another powerful
  1315.          feature called an AKA (pronounced "a-k-a").
  1316.  
  1317.          AKAs provide a text-substitution capability to Anarkey.  You
  1318.          can assign a long string of characters to a short character
  1319.          string of one or two characters.  Then when you enter the
  1320.          short string on the input line, Anarkey will replace it with
  1321.          the long string.  This text substitution occurs after the
  1322.          line has been accepted, but before it has been executed,
  1323.          therefore, the substitution is transparent to the user.
  1324.  
  1325.          If you are familiar with another command-line editor, an
  1326.          Anarkey AKA is analogous to what is sometimes referred to as
  1327.          an alias or synonym.  "AKA" is an acronym for
  1328.          "Also-Known-As" and "AnarKey Alias."
  1329.  
  1330.          In Anarkey's default configuration, AKAs are not supported.
  1331.          This saves DOS memory because none of the code needed to
  1332.          process AKAs remains resident.  If you wish to use Anarkey's
  1333.          AKA feature, you must specify the -A option when Anarkey is
  1334.          installed.  Immediately following the -A option, specify the
  1335.          amount of memory Anarkey should reserve to store your AKAs.
  1336.          For example, to store 200 characters of AKAs, install
  1337.          Anarkey with the option -A200.  The -A option is also
  1338.          described in Chapter 11 of this manual.
  1339.  
  1340.          Defining an AKA
  1341.  
  1342.          An AKA is composed of two parts: an AKA word and a
  1343.          substitution string.  In most cases, the AKA word will be
  1344.          short and the substitution string fairly long or
  1345.          complicated.  When you type the AKA word onto an input line
  1346.          and accept the line, Anarkey replaces the word with its
  1347.          substitution string.
  1348.  
  1349.          AKAs can be defined on the DOS command line or via the Load
  1350.          program.  (Load is discussed in Chapter 14.)  The syntax for
  1351.          both methods is identical and is shown below.
  1352.  
  1353.  
  1354.                 :AKA_word substitution_string
  1355.  
  1356.  
  1357.          A colon(:) character marks the start of an AKA definition
  1358.          and AKA word.  AKA words are not case sensitive; "word" is
  1359.          equivalent to "WORD."  The first space or <Tab> character
  1360.          marks the end of the AKA word.  The remainder of the line is
  1361.          the substitution string.
  1362.  
  1363.          If the definition's AKA word is identical to an existing
  1364.          AKA, the existing AKA is replaced with the new definition.
  1365.  
  1366.          A definition's substitution string can include multiple
  1367.          commands, provided each command is separated by a
  1368.          semicolon(;).  Entering multiple commands per line is
  1369.          documented in Chapter 7.
  1370.  
  1371.          Anarkey performs a length check on each command specified in
  1372.          the substitution string.  If any single command exceeds 127
  1373.          characters, Anarkey will refuse to accept the definition.
  1374.          It will beep and position the cursor beneath the first
  1375.          character that exceeds the limit.
  1376.  
  1377.          AKAs cannot be nested.  In other words, if the substitution
  1378.          string contains the AKA word from another definition (that
  1379.          is, the AKA word is "nested" in the substitution string),
  1380.          when Anarkey performs the substitution operation, the nested
  1381.          AKA word is not replaced.
  1382.  
  1383.          The following line defines an AKA called "home" and a
  1384.          substitution string of "cd \mydir."
  1385.  
  1386.  
  1387.                 :home cd \mydir
  1388.  
  1389.  
  1390.          If you enter the above AKA definition onto the input line
  1391.          and press <Enter>, Anarkey will save the AKA in it storage
  1392.          area.  If there is not enough room to save the definition,
  1393.          Anarkey beeps.
  1394.  
  1395.          To use an AKA, simply enter its AKA word onto the input
  1396.          line.  Using our example, typing "home" and <Enter> will
  1397.          execute the command "cd \mydir."
  1398.  
  1399.          It is important when entering AKAs that they be specified in
  1400.          the command-portion of the line.  The substitution operation
  1401.          is only performed on commands and program names and not on
  1402.          program arguments or parameters.  This is illustrated in the
  1403.          following two input lines.
  1404.  
  1405.  
  1406.                 >home          Executes "cd \mydir"
  1407.  
  1408.                 >cd home       Executes "cd home," not "cd cd \mydir"
  1409.  
  1410.  
  1411.          Any arguments following the AKA on the input line are
  1412.          appended to the substituted sting.  For example, take the
  1413.          following AKA definition.
  1414.  
  1415.  
  1416.                 :d   dir
  1417.  
  1418.  
  1419.          Now if you enter "d *.exe" on the input line, Anarkey will
  1420.          expand it to "dir *.exe" before execution.   Notice that the
  1421.          "*.exe" argument was appended to the substitution string.
  1422.  
  1423.          Viewing AKAs
  1424.  
  1425.          The list of defined AKAs can be viewed at any time by
  1426.          pressing <Alt-F4>.  AKAs will be displayed one per line
  1427.          until the screen is full.  Press any key to see the next
  1428.          screen's worth of AKAs.  At the end of the displayed list,
  1429.          Anarkey will output the amount of space still available to
  1430.          store further AKA definitions.
  1431.  
  1432.          If AKAs have not been enabled via the -A command-line
  1433.          option, the <Alt-F4> key has no effect.
  1434.  
  1435.          The Anarkmd program also supports saving AKA definitions to
  1436.          a disk file suitable for processing by the Load program.
  1437.          This allows you to save your AKA definitions between
  1438.          computer sessions.  The Anarkmd program is discussed in
  1439.          Chapter 16.  Load is explained in Chapter 14.
  1440.  
  1441.          Undefining an AKA
  1442.  
  1443.          To undefine an AKA, simply specify the AKA word preceded by
  1444.          a colon(:).  Do not specify a substitution string.  For
  1445.          example, to undefine our sample AKA, enter the following
  1446.          line.
  1447.  
  1448.  
  1449.                 :home
  1450.  
  1451.  
  1452.          Additionally, every AKA can be undefined in one fell swoop
  1453.          by pressing <Alt-X>.  This clears the entire AKA storage
  1454.          area so that no AKAs are defined.
  1455.  
  1456.          Parameter Fields
  1457.  
  1458.          All the AKAs shown so far are simple text substitutions
  1459.          where the AKA word is directly replaced by the substitution
  1460.          string.  However, substitution strings may contain something
  1461.          called a parameter field.  A parameter field is a special
  1462.          type of designation in the substitution string.  Parameter
  1463.          fields are specified by a leading percent sign(%) followed
  1464.          by a single-digit number from 1 through 9.  For example, %1,
  1465.          %2, %6 and %9 are all valid parameter fields.  The following
  1466.          is an AKA definition that uses parameter fields.
  1467.  
  1468.  
  1469.                 :test   echo %1 %2 %3
  1470.  
  1471.  
  1472.          When Anarkey is processing an AKA and performing text
  1473.          substitution (that is, after you have entered and accepted a
  1474.          line), a parameter field is replaced with the corresponding
  1475.          argument taken from the input line.  For example, the %1
  1476.          parameter field is replaced with the AKA's first argument,
  1477.          %2 with the second and so on.
  1478.  
  1479.          Given our sample AKA above, entering the input line "test
  1480.          one two three" would result in the command "echo one two
  1481.          three" being executed.  The %1 parameter field in the
  1482.          substitution string is replaced with the first argument to
  1483.          "test," that is, "one."  The other two parameter fields and
  1484.          arguments are handled in the same manner.
  1485.  
  1486.          Now suppose we redefined our "test" AKA to the following.
  1487.  
  1488.  
  1489.                 :test   echo %3 %2 %1
  1490.  
  1491.  
  1492.          Entering the same "test one two three" line would result in
  1493.          the execution of the command "echo three two one."  Notice
  1494.          the %3 parameter field was substituted with the third
  1495.          argument to "test," %2 with the second argument and %1 with
  1496.          the first.
  1497.  
  1498.          If a substitution string contains a parameter field, but the
  1499.          input line has no corresponding argument, the parameter
  1500.          field is replaced with an empty string.  In other words, the
  1501.          parameter field is deleted.  Thus, given the previous "test"
  1502.          AKA, the input line "test one" would execute "echo one."
  1503.          Notice that since there is no second or third argument, the
  1504.          %2 and %3 parameter fields are ignored.
  1505.  
  1506.          Conversely, if the AKA definition contains a parameter
  1507.          field, but the input line includes additional arguments, the
  1508.          extra arguments are ignored.  Thus, a line of "test one two
  1509.          three four"  converts to "echo three two one" and the extra
  1510.          "four" argument is ignored.  Notice that this is different
  1511.          than if there were no parameter fields specified in the
  1512.          definition.  Recall that without parameter fields, all
  1513.          arguments are appended to the end of the substitution string.
  1514.  
  1515.          Parameter fields provide the advantage of being able to
  1516.          position an argument in a specific place within the
  1517.          substitution string.  They can be used to create fairly
  1518.          powerful AKAs which approach the functionality of batch
  1519.          files, but execute much faster.
  1520.  
  1521.          Here is an example of an AKA definition that copies files to
  1522.          a specified drive.  The AKA accepts multiple drive
  1523.          specifications and each can include the DOS wildcard
  1524.          characters.  The syntax of the AKA is:
  1525.  
  1526.  
  1527.                 MCOPY drive file_spec [file_spec ...]
  1528.  
  1529.  
  1530.          For example, you can enter "mcopy a: *.doc test.* *.com."
  1531.          The result will be that all files matching the *.doc, test.*
  1532.          and *.com specifications will be copied to the A: drive.
  1533.          Here is the AKA definition for this command.
  1534.  
  1535.  
  1536.          :mcopy   for %f in (%2 %3 %4 %5 %6 %7 %8 %9) do copy %f %1
  1537.  
  1538.  
  1539.          As you can see, the substitution string uses the DOS "for"
  1540.          command.  If you are unfamiliar with this command, refer to
  1541.          your DOS manual for details.  The "for" command is usually
  1542.          used in batch files, however, it can be used on the command
  1543.          line as well.
  1544.  
  1545.          When the input line "mcopy a: *.doc test.* *.com" is
  1546.          entered, the executed line after substitution is shown below.
  1547.  
  1548.  
  1549.                 for %f in (*.doc test.* *.com) do copy %f a:
  1550.  
  1551.  
  1552.          When DOS executes the "for" command, the effect will be the
  1553.          same as executing the three commands "copy *.doc a:," "copy
  1554.          test.* a:" and "copy *.com a:."
  1555.  
  1556.          Summary
  1557.  
  1558.          In summary, this chapter documented how to work with AKAs
  1559.          and the following keystroke operation.
  1560.  
  1561.  
  1562.                  <Alt-F4>        View AKAs
  1563.  
  1564.  
  1565.  
  1566.          Chapter 6
  1567.  
  1568.          Filename Completion
  1569.  
  1570.          The average input line often includes a filename.  Many
  1571.          times the filename is prefaced by a path specification.  And
  1572.          all input lines include a program or command to execute.
  1573.          Because these items are entered so often, Anarkey provides
  1574.          functions to complete them for you automatically.  These
  1575.          completion operations are similar in concept to the line
  1576.          completion functions discussed in Chapter 4.  As you
  1577.          continue to learn Anarkey, it will become clear that
  1578.          entering most items on an input line requires only that you
  1579.          type one or two characters of the item and then let Anarkey
  1580.          do the rest.
  1581.  
  1582.          Completing Names
  1583.  
  1584.          Anarkey divides the completion of filenames into two
  1585.          categories: directory names and all other files.  The group
  1586.          "all other files" includes programs and "normal" files, such
  1587.          as text or data files; in other words, anything that is not
  1588.          a directory.  Although completing a directory name isn't
  1589.          much different from completing a filename, there are some
  1590.          minor differences.  These differences will be noted where
  1591.          applicable.  Unless stated otherwise, all operations
  1592.          described in the remainder of this chapter apply to name
  1593.          completions of all types.
  1594.  
  1595.          To complete a directory name, press <F7> or <Ctrl-D>.  To
  1596.          complete the name of any other type of file, press <F8> or
  1597.          <Ctrl-F>.  Any non-whitespace characters (e.g. blank or
  1598.          <Tab>) immediately preceding the cursor position are used to
  1599.          narrow down the list of possible completions.  For example,
  1600.          if the cursor followed the letter "d," Anarkey would
  1601.          complete the name using only those files starting with the
  1602.          letter "d."  The case of the letters is not important.  If
  1603.          no or a blank character precedes the cursor, Anarkey will
  1604.          match all files in the category (directory or otherwise).
  1605.  
  1606.          If Anarkey finds an existing file that could complete the
  1607.          filename, it enters it onto the input line.  The cursor
  1608.          position remains unchanged.  If the completed name is not
  1609.          the one you desire, press the appropriate completion key
  1610.          again and Anarkey will cycle through the list of possible
  1611.          completions.
  1612.  
  1613.          Once Anarkey has completed the filename, the cursor will
  1614.          still be at its original position, that is, somewhere in the
  1615.          middle of the completed name.  If you need to enter
  1616.          additional characters after the filename, the cursor will
  1617.          have to be moved.  This can be accomplished by pressing the
  1618.          <End> or <Right> arrow keys, but there is a faster way:
  1619.          simply type them in!  Anarkey will automatically move the
  1620.          cursor to the first position beyond the completed name if
  1621.          the first keystroke after a name completion is one of the
  1622.          following:
  1623.  
  1624.  
  1625.          Space          Backslash(\)            Colon(:)
  1626.          Slash(/)       Input redirection(<)    Semicolon(;)
  1627.          Asterisk(*)    Output redirection(>)   Equal sign(=)
  1628.          Plus sign(+)   Question mark(?)        Pipe character(|)
  1629.          Comma(,)       Dash(-)(only if -U active)
  1630.  
  1631.  
  1632.          After moving the cursor, the typed character is entered onto
  1633.          the input line.
  1634.  
  1635.          Note that the dash(-) character moves the cursor only if the
  1636.          -U option was specified on the Anarkey installation line.
  1637.          The -U option controls Anarkey's interpretation of the
  1638.          slash(/) and dash(-) characters as a path separator and
  1639.          switch (or option) specifier, respectively.  This topic is
  1640.          discussed in detail in Chapter 10 so don't worry about it
  1641.          for now.
  1642.  
  1643.          If any other character beside those listed above is typed
  1644.          following a completion operation, the character in entered
  1645.          onto the input line at the current cursor position.  This is
  1646.          useful in case you begin a completion operation only to
  1647.          discover there is a large number of possible completions.
  1648.          For example, you start completing all the files that start
  1649.          with the letter "c," but suddenly remember 75 files start
  1650.          with a "c."  Rather then cycle through them all until you
  1651.          hit upon the desired file, you can enter additional
  1652.          characters to narrow the completion possibilities down.
  1653.  
  1654.          When Anarkey completes the name of a program file, it does
  1655.          not include the file's extension when it enters the name on
  1656.          the input line.  Program names must have the file extension
  1657.          BAT, COM or EXE.
  1658.  
  1659.          When Anarkey searches for the completion to a "normal"
  1660.          filename, in other words, any file other than a program or
  1661.          directory, it ignores files with certain extensions.  A file
  1662.          using one of the following extensions will not be completed
  1663.          by Anarkey.
  1664.  
  1665.  
  1666.          .$$$           .BAK            .BIN            .COM
  1667.          .EXE           .TMP            .HEX            .LIB
  1668.          .OBJ           .OVR            .SYS
  1669.  
  1670.  
  1671.          These extensions are ignored because the files which use
  1672.          them are rarely entered on input lines.  Anarkey attempts to
  1673.          save you the trouble of cycling through these undesired
  1674.          files by ignoring them.  If you prefer that Anarkey not
  1675.          ignore files using the above extensions, you can specify the
  1676.          -X\ option on the installation command line.  Also, you can
  1677.          add additional extensions to the ignored list via the -X
  1678.          option.  Complete details will be covered in Chapter 11.
  1679.  
  1680.          Pop-Up Filename Completion Window
  1681.  
  1682.          A pop-up window that contains the entire list of completions
  1683.          can be displayed by pressing <Alt-F8> or <Alt-F>.  All file
  1684.          types, directories and others, are displayed in the window.
  1685.          From this window you can scroll through the list and select
  1686.          the desired filename using the keyboard or a mouse.  The
  1687.          file-completion window is identical to the history-buffer
  1688.          window in the way scrolling and selection are performed.
  1689.          Refer to the discussion of the history-buffer window in
  1690.          Chapter 4 or press the <F1> key with the file-completion
  1691.          window displayed to refresh your memory on the supported
  1692.          operations.
  1693.  
  1694.          Summary
  1695.  
  1696.          The following operations and their assigned keystrokes were
  1697.          discussed in this chapter.
  1698.  
  1699.  
  1700.                  <F7>            Complete directory name
  1701.                  <Ctrl-D>        Same as <F7>
  1702.                  <F8>            Complete program/file name
  1703.                  <Ctrl-F>        Same as <F8>
  1704.                  <Alt-F8>        Pop-up filename completion window
  1705.                  <Alt-F>         Same as <Alt-F8>
  1706.  
  1707.  
  1708.  
  1709.          Chapter 7
  1710.  
  1711.          Multiple Commands per Line 
  1712.  
  1713.          In plain, vanilla DOS, you are allowed to enter only one
  1714.          command per input line.  With Anarkey, multiple commands can
  1715.          be included on a single input line.  Using multiple commands
  1716.          will reduce the number of line retrieval operations
  1717.          performed.  More importantly, multiple commands are
  1718.          extremely useful for AKA definitions.  An AKA that uses
  1719.          multiple commands is like a miniature batch file.
  1720.  
  1721.          Entering Multiple-Command Lines
  1722.  
  1723.          Multiple commands are separated on the input line by a
  1724.          semicolon(;).  When a line is accepted, Anarkey breaks it
  1725.          into separate commands and passes each one to the command
  1726.          processor for execution.  The semicolon separators are
  1727.          "eaten" by Anarkey and are not passed as part of the command.
  1728.  
  1729.          The following are examples of input lines that contain
  1730.          multiple commands.
  1731.  
  1732.  
  1733.                 cd \temp;dir
  1734.                 md \newdir;cd \newdir;copy \olddir\*.* \newdir
  1735.                 edit letter.doc;print letter.doc
  1736.  
  1737.  
  1738.          There are two situations where the semicolon character is
  1739.          not interpreted as a command separator: (1) the semicolon is
  1740.          the very last character on the input line and (2) any
  1741.          semicolon used in a PATH, PROMPT or SET command.
  1742.  
  1743.          If you wish to include a semicolon in a command, specify two
  1744.          consecutive semicolons.  Anarkey will convert them to a
  1745.          single semicolon character before passing the command along
  1746.          for execution.
  1747.  
  1748.          The following input lines use semicolon characters as part
  1749.          of the command rather than as separators.
  1750.  
  1751.  
  1752.                 masm anarkey;
  1753.                 path=c:\dos;d:\global;c:\masm
  1754.                 prnt doc1.txt;;doc2.txt
  1755.  
  1756.  
  1757.          Multiple commands can be disabled on a per-line or permanent
  1758.          basis.  With multiple commands disabled, the semicolon
  1759.          character is never interpreted as a command separator.  To
  1760.          disable multiple commands on the current input line, press
  1761.          <F10> or <Ctrl-R>.  The -O installation option will disable
  1762.          multiple commands for the entire Anarkey session.  (However,
  1763.          note that multiple commands are still allowed in AKA
  1764.          definitions, even with the -O option.)
  1765.  
  1766.          Length Considerations
  1767.  
  1768.          Anarkey input lines can be up to 255 characters in length.
  1769.          However, individual commands within the line are restricted
  1770.          to the maximum length specified by the command processor in
  1771.          service.  The standard DOS COMMAND.COM program prohibits
  1772.          commands composed of more than 127 characters.
  1773.  
  1774.          If you attempt to accept an input line that contains a
  1775.          command whose length exceeds the maximum allowed by the
  1776.          command processor, Anarkey will beep and position the cursor
  1777.          beneath the first character that exceeds the limit.
  1778.  
  1779.          You can also have Anarkey check the length of your commands
  1780.          before you accept the line by pressing <F2>.  If any
  1781.          commands exceed the maximum, the cursor will be positioned
  1782.          at the first character beyond the limit.  Anarkey will do
  1783.          nothing if all commands in the line are within bounds.
  1784.  
  1785.          Miscellaneous Considerations
  1786.  
  1787.          There are a few minor characteristics of multiple-command
  1788.          lines that must be mentioned.
  1789.  
  1790.          First, if the Load program (discussed in Chapter 14) is
  1791.          included on a multiple-command input line, it must be the
  1792.          last command in the line.  Any commands following Load will
  1793.          not be executed.
  1794.  
  1795.          Second, many programs allow you to temporarily exit the
  1796.          program and shell to DOS.  Normally, Anarkey would process
  1797.          the input line while in this temporary DOS shell.  However,
  1798.          if the program that was temporarily exited was invoked from
  1799.          a multiple-command line, Anarkey will disable itself while
  1800.          in the DOS shell.  This is done to prevent any subsequent
  1801.          commands in the original input line from being executed
  1802.          while in the temporary shell.  The following input line
  1803.          illustrates this situation.
  1804.  
  1805.  
  1806.                 cd \work;progname;cd \home
  1807.  
  1808.  
  1809.          Imagine you were to temporarily shell to DOS while executing
  1810.          "progname."  If Anarkey was active, it would execute the
  1811.          next command in the line, "cd \home."  However, that command
  1812.          should not really be executed until "progname" has
  1813.          completed.  To achieve this, Anarkey disables itself while
  1814.          the temporary DOS shell is in effect.  Once "progname"
  1815.          terminates, Anarkey automatically enables itself and
  1816.          executes "cd \home."
  1817.  
  1818.          Note the automatic disabling is only performed when
  1819.          processing multiple-command lines.  Normally, Anarkey is
  1820.          active when temporarily exiting a program to DOS.
  1821.  
  1822.          Summary
  1823.  
  1824.          In summary, this chapter described the functions assigned to
  1825.          the following keys.
  1826.  
  1827.  
  1828.                  <F2>            Check command lengths
  1829.                  <F10>           Disable multiple commands on current
  1830.                                  line
  1831.                  <Ctrl-R>        Same as <F10>
  1832.  
  1833.  
  1834.          Chapter 8
  1835.  
  1836.          Editing Environment Variables
  1837.  
  1838.          In addition to retrieving past lines from the history
  1839.          buffer, Anarkey can retrieve environment variables and enter
  1840.          their values onto the input line.  Once retrieved, the value
  1841.          can be modified using the standard editing facilities.  This
  1842.          is particularly useful for those times when you need to add
  1843.          a new directory to the end of the PATH setting.
  1844.  
  1845.          To retrieve the value of an environment variable, enter the
  1846.          "SET" command followed by at least one space and then zero
  1847.          or more characters of the desired variable's name.  Then
  1848.          press the <F9> or <Ctrl-E> key.  If one or more characters
  1849.          of the name are entered, Anarkey searches for an environment
  1850.          variable to complete the name.  You can cycle through all
  1851.          matching completions by repeatedly pressing <F9> or
  1852.          <Ctrl-E>.  If no characters of the name are entered, Anarkey
  1853.          cycles through all the defined environment variables.
  1854.  
  1855.          When an environment variable is retrieved, its complete name
  1856.          is entered on the input line followed by an equal sign and
  1857.          its value.  The cursor is positioned beneath the first
  1858.          character after the equal sign.
  1859.  
  1860.          Normally, the PATH and PROMPT environment variables do not
  1861.          require that they be preceded by the SET command.  Anarkey
  1862.          will still retrieve the values of PATH and PROMPT even if
  1863.          they are not in an explicit SET command.  However, their
  1864.          complete variable names must be entered on the input line
  1865.          before pressing <F9> or <Ctrl-E>; Anarkey will not complete
  1866.          the names of PATH and PROMPT if they are not preceded by the
  1867.          SET command.
  1868.  
  1869.          For example, enter the following input line and press <F9>
  1870.          to retrieve the value of the PATH variable.  (The underscore
  1871.          represents the cursor position.)
  1872.  
  1873.  
  1874.                 >path_
  1875.  
  1876.  
  1877.          Pop-Up Environment Window
  1878.  
  1879.          A full-screen pop-up window containing an alphabetized list
  1880.          of all environment variables can be displayed by pressing
  1881.          <Alt-F9> or <Alt-E>.  Like all the other Anarkey pop-up
  1882.          windows, Anarkmd actually performs the window operation, so
  1883.          be sure the Anarkmd program is in either the current
  1884.          directory or a directory along the PATH.
  1885.  
  1886.          The environment window is similar to the other windows
  1887.          discussed to this point.  The current variable is displayed
  1888.          in reverse video.  Other variables in the list can be made
  1889.          current by using the <Up> and <Down> arrow keys.  If more
  1890.          variables are defined than can fit in one window, the window
  1891.          can be scrolled using the keyboard or mouse.  Selecting a
  1892.          variable for retrieval is performed by making the variable
  1893.          current and pressing <Enter>.  The mouse can also be used to
  1894.          select the desired variable.  If you need help on using the
  1895.          environment window, press <F1> to display a
  1896.          context-sensitive help screen.  Refer to Chapter 4 and the
  1897.          discussion of the history-buffer window for complete details
  1898.          about the recognized window keystrokes and mouse actions.
  1899.  
  1900.          Summary
  1901.  
  1902.          In summary, the environment variable functions and
  1903.          keystrokes described in this chapter are listed below.
  1904.  
  1905.  
  1906.                  <F9>            Retrieve environment variable value
  1907.                  <Ctrl-E>        Same as <F9>
  1908.                  <Alt-F9>        Pop-up environment window
  1909.                  <Alt-E>         Same as <Alt-F9>
  1910.  
  1911.  
  1912.          Chapter 9
  1913.  
  1914.          The MegaKey and MenuKey
  1915.  
  1916.          Throughout this manual, you have learned about many
  1917.          keystrokes that invoke individual Anarkey functions.  In
  1918.          this chapter, you will learn two new keystrokes which
  1919.          combine the operations of several of those functions.  The
  1920.          MegaKey and MenuKey are two of Anarkey's most potent
  1921.          strengths.  With these two simple keys, you gain access to
  1922.          all of Anarkey's completion, line-retrieval and window
  1923.          functions.
  1924.  
  1925.          The MegaKey
  1926.  
  1927.          In the previous chapters, you learned about several separate
  1928.          Anarkey functions which retrieve and complete items on input
  1929.          lines.  Each of those functions and their assigned
  1930.          keystrokes are listed below.
  1931.  
  1932.  
  1933.                  <F5>, <Ctrl-K>          Retrieve line from history
  1934.                                          buffer
  1935.                  <F7>, <Ctrl-D>          Complete directory name
  1936.                  <F8>, <Ctrl-F>          Complete filename
  1937.                  <F9>, <Ctrl-E>          Retrieve environment variable
  1938.  
  1939.  
  1940.          Rather than force you to remember all those keystrokes and
  1941.          have to think about which one to press at a given time,
  1942.          Anarkey combines them all into a single MegaKey.  By
  1943.          default, the MegaKey is assigned to <Tab>.  When you press
  1944.          <Tab>, Anarkey determines on its own the type of completion
  1945.          or retrieval operation you desire and does it for you.  Of
  1946.          course, you can still press any of the keys listed above,
  1947.          but in most instances, it will be easier to just press <Tab>
  1948.          and let Anarkey do all the work.
  1949.  
  1950.          Like all the other retrieval and completion functions, the
  1951.          MegaKey can be pressed repeatedly to cycle through the list
  1952.          of possibilities.
  1953.  
  1954.          The MegaKey will correctly determine the desired type of
  1955.          operation an amazingly high percentage of the time.
  1956.          However, you may occasionally have to cycle through some
  1957.          unwanted completions before getting to the one you want.
  1958.  
  1959.          The MenuKey
  1960.  
  1961.          The MenuKey is a close cousin of the MegaKey.  Like the
  1962.          MegaKey, it combines several operations to a single key.
  1963.          The MenuKey can be thought of as a "front-end" to all of
  1964.          Anarkey's pop-up window functions listed below.
  1965.  
  1966.  
  1967.                  <Alt-F1>, <Alt-H>       Pop-up help window
  1968.                  <Alt-F5>, <Alt-K>       Pop-up line retrieval window
  1969.                  <Alt-F8>, <Alt-F>       Pop-up filename completion
  1970.                                          window
  1971.                  <Alt-F9>, <Alt-E>       Pop-up environment window
  1972.  
  1973.  
  1974.          The MenuKey is assigned to the <Alt-Tab> and <Shift-Tab>
  1975.          keys.  However, be aware that the <Alt-Tab> key is not
  1976.          normally recognized on DOS systems.  If your system has an
  1977.          enhanced, 101-key keyboard (i.e. a keyboard with <F11> and
  1978.          <F12> keys), you can use the 101-Keys program to allow DOS
  1979.          to recognize <Alt-Tab> and many other keystrokes.  101-Keys
  1980.          is discussed in Chapter 15.
  1981.  
  1982.          Like all the other Anarkey window functions, be sure the
  1983.          Anarkmd program is located in either the current directory
  1984.          or a directory along the PATH before pressing the MenuKey.
  1985.  
  1986.          The MenuKey displays a pop-up menu.  Each of the above
  1987.          operations is listed in the menu.  In addition, the item
  1988.          "Return to Command Line" is included in the menu.  Using the
  1989.          selection techniques discussed for windows in previous
  1990.          chapters, you select a menu item via the keyboard or a
  1991.          mouse.  The operation you select is then executed.
  1992.  
  1993.          For example, if the help window menu item is selected, the
  1994.          pop-up help window is displayed onscreen.  The effect is the
  1995.          same as if you had pressed the <Alt-F1> key to display the
  1996.          window, but now you only have to remember a single key, the
  1997.          MenuKey, to display any of the supported Anarkey windows.
  1998.  
  1999.          Summary
  2000.  
  2001.          Despite its brief length, this chapter described Anarkey's
  2002.          most powerful functions, the MegaKey and MenuKey.  These two
  2003.          functions are great leaps toward a state of total Anarkey, a
  2004.          state without keystrokes.  Learn them and your life at the
  2005.          command prompt will become a pleasure.
  2006.  
  2007.  
  2008.                  <Tab>           MegaKey
  2009.                  <Alt-Tab>       MenuKey
  2010.                  <Shift-Tab>     Same as <Alt-Tab>
  2011.  
  2012.  
  2013.          Chapter 10
  2014.  
  2015.          Unix Switchar Conventions
  2016.  
  2017.          The Unix operating system separates directory names in a
  2018.          path specification with a slash(/) character rather than
  2019.          DOS's backslash(\).  Also, a Unix command-line option, often
  2020.          called a switch, is always preceded by a dash(-) while DOS
  2021.          uses a slash for switches.  The character used by an
  2022.          operating system to specify program switches is referred to
  2023.          as the switchar (pronounced "switch-char").
  2024.  
  2025.          Many people prefer the Unix switchar convention over the DOS
  2026.          method.  Interestingly, early DOS versions supported an
  2027.          undocumented system function which caused the COMMAND.COM
  2028.          internal commands, like COPY and DIR, to recognize the Unix
  2029.          switchar conventions.  There are several public domain
  2030.          programs available that use this undocumented function to
  2031.          alter the DOS switchar.  When run, they allow the user to
  2032.          enter a dash before each command option and slashes in path
  2033.          specifications.
  2034.  
  2035.          Unfortunately, these switchar programs suffer from several
  2036.          difficulties.  First, they only effect internal COMMAND.COM
  2037.          commands and not external or third-party programs, like
  2038.          XCOPY.  Second, they have some strange side-effects which
  2039.          can make them an adventure to use at times.  And finally,
  2040.          both the compatibility box of OS/2 and DOS versions since
  2041.          4.00 do not implement the undocumented switchar function,
  2042.          making it impossible to change the switch character in these
  2043.          newer environments.
  2044.  
  2045.          Anarkey provides complete Unix switchar support with none of
  2046.          the problems inherent in the switchar programs.  All
  2047.          programs, whether internal to COMMAND.COM or external, will
  2048.          recognize Unix switchar conventions.  Further, Anarkey
  2049.          implements the switchar support in a consistent manner so
  2050.          there are no undesirable side effects.  Also, Anarkey fills
  2051.          the void left by the new operating systems which do not
  2052.          allow modification of the system's switchar.
  2053.  
  2054.          By default, Anarkey's Unix switchar support is disabled.  It
  2055.          is enabled by including the -U option on Anarkey's
  2056.          command-line.  This causes Anarkey to modify certain
  2057.          characters entered on an input line.  Generally, the
  2058.          characters used in the Unix switchar convention get
  2059.          converted to those used in DOS.  The result is that a line
  2060.          entered using the Unix convention is translated to its DOS
  2061.          equivalent.  This translation is invisible to the user.
  2062.  
  2063.          Only two characters are potentially modified by the switchar
  2064.          translation.  They are shown in the table below along with
  2065.          the character to which each is converted.  Note: The
  2066.          backslash character is included in the table to emphasize
  2067.          that it can still be used as a path separator even with Unix
  2068.          switchar support active.  Both slashes and backslashes are
  2069.          valid path separators.
  2070.  
  2071.  
  2072.          Character on input line    Converted to
  2073.          -----------------------    ------------
  2074.                    /                     \
  2075.                    -                     / (unless used in file name)
  2076.                    \                     \ (unchanged)
  2077.  
  2078.  
  2079.          The character translation Anarkey performs is demonstrated
  2080.          in the following sample input lines.
  2081.  
  2082.  
  2083.          Input Line                     Translated Line
  2084.          -------------------------      -------------------------
  2085.          dir -p                         dir /p
  2086.          copy a:/dos/*.com              copy a:\dos\*.com
  2087.          c:/dos/xcopy a:/*.* c: -s      c:\dos\xcopy a:\*.* c: /s
  2088.  
  2089.  
  2090.          If you wish to type a slash or dash character and not have
  2091.          it translated, enter the character twice.  For example, to
  2092.          execute the line "dir /p," you can enter "dir //p" (or "dir
  2093.          -p" as shown in the previous table).
  2094.  
  2095.          In DOS, the dash character is often used in filenames, as in
  2096.          "101-Keys."  If Anarkey were to translate dashes used in
  2097.          filenames, the resulting line would be incorrect.  For
  2098.          example, the line "copy 101-keys.com a:" would be converted
  2099.          to "copy 101/keys.com a:."  Fortunately, Anarkey does not
  2100.          translate dash characters used in filenames.  Anarkey
  2101.          determines the dash character's context by checking the
  2102.          character that immediately precedes the dash.  If the
  2103.          character is not a blank space, the dash is assumed to be
  2104.          part of a filename.  Otherwise, it is determined the dash is
  2105.          a switchar and it gets translated to a slash character.
  2106.  
  2107.          Unix-Type Programs
  2108.  
  2109.          Some third-party programs already support the Unix switchar
  2110.          convention.  Character translation can cause a problem for
  2111.          these programs when they receive a line using the DOS syntax
  2112.          rather than the expected Unix syntax.  For example, a
  2113.          program that recognizes Unix conventions will not understand
  2114.          an input line such as "sort /dos/text.doc -b" after Anarkey
  2115.          translates it to "sort \dos\text.doc /b."  Such programs
  2116.          need to receive untranslated input lines.
  2117.  
  2118.          Since Unix-switchar translation must be applied on a
  2119.          program-by-program basis, you must tell Anarkey which
  2120.          programs already recognize the Unix convention.  Then when
  2121.          you execute that program in the future, Anarkey will not
  2122.          perform a translation on the program's arguments.
  2123.  
  2124.          To inform Anarkey that a program recognizes the Unix
  2125.          switchar syntax, enter the program's name on the input line
  2126.          preceded by an exclamation point(!).  For example, to
  2127.          prevent translations from occurring on the SORT program's
  2128.          input line, enter the command "!sort."
  2129.  
  2130.          Depending upon the programs you typically run, you may have
  2131.          a large number of Unix-type program names to enter.  To save
  2132.          you from having to enter each program every time you run
  2133.          your computer, you can store the list of program names in a
  2134.          text file and have the Load program send it to Anarkey upon
  2135.          program start-up.  Additionally, the Anarkmd program can
  2136.          create the text file of program names for you.  These
  2137.          capabilities of Load and Anarkmd are discussed in Chapters
  2138.          14 and 16, respectively.
  2139.  
  2140.          When Anarkey receives the name of a Unix-type program, it
  2141.          stores the name in its Unix buffer.  The Unix buffer is an
  2142.          area of memory Anarkey allocates during installation.  By
  2143.          default, Anarkey does not support Unix switchar usage and
  2144.          therefore, no memory is allocated for the Unix buffer.  When
  2145.          the -U option is specified during installation, Anarkey
  2146.          allocates a 25-character Unix buffer.  If more space is
  2147.          required to hold Unix-type program names, the desired size
  2148.          of the Unix buffer can be specified by appending it to the
  2149.          end of the -U option.  For example, to enable Unix switchar
  2150.          translations and allocate a Unix buffer of 100 characters,
  2151.          include -U100 on the Anarkey installation line.  The -U
  2152.          option is more fully described in Chapter 11.
  2153.  
  2154.          Note: The Anarkmd program already recognizes Unix switchar
  2155.          syntax, therefore, it should always be stored in the Unix
  2156.          buffer.  Because Anarkey makes extensive use of Anarkmd
  2157.          (e.g. to display the various pop-up windows), when the -U
  2158.          option is specified, Anarkey automatically saves the Anarkmd
  2159.          program in the Unix buffer.  This preloading of the buffer
  2160.          is done to guarantee Anarkmd's proper execution and save you
  2161.          the trouble of storing it yourself.
  2162.  
  2163.          If there is not enough room to store a program's name in the
  2164.          Unix buffer, Anarkey will beep.
  2165.  
  2166.          A program can be removed from the Unix buffer by preceding
  2167.          its name on the input line with two exclamation points.  For
  2168.          example, "!!sort" removes the SORT program from the Unix
  2169.          buffer.
  2170.  
  2171.          The entire list of programs stored in the Unix buffer can be
  2172.          displayed by pressing <Shift-F4>.  Each output line will
  2173.          contain one program name preceded by an exclamation point.
  2174.          If all programs cannot be displayed on a single screen,
  2175.          output is paused between screens.  Press any key to display
  2176.          the next screen of names.
  2177.  
  2178.          Note that when a program is stored in the Unix buffer, only
  2179.          the program's arguments will remain untranslated; all other
  2180.          items on the input line, including the program's path
  2181.          specification, redirected filenames and piped commands, are
  2182.          still translated.  These are all demonstrated in the
  2183.          following input line and the resulting translated line.
  2184.  
  2185.  
  2186.          Input line:
  2187.          c:/bin/sort -b >f:/log.txt | echo -test --the /translations
  2188.  
  2189.          Translated line:
  2190.          c:\bin\sort -b >f:\log.txt | echo /test -the \translations
  2191.  
  2192.  
  2193.          As this example illustrates, Anarkey intelligently parses
  2194.          the input line and translates only the appropriate
  2195.          characters.
  2196.  
  2197.          Summary
  2198.  
  2199.          This chapter has described Anarkey's Unix switchar support
  2200.          and the following related function.
  2201.  
  2202.  
  2203.                  <Alt-F4>        Display Unix buffer
  2204.  
  2205.  
  2206.  
  2207.          Chapter 11
  2208.  
  2209.          Anarkey Installation Options
  2210.  
  2211.          Anarkey recognizes a large assortment of installation
  2212.          options which can be used to configure Anarkey to your
  2213.          preferences.
  2214.  
  2215.          Options are specified on the Anarkey command-line during
  2216.          installation.  An option must be preceded by a dash(-) or
  2217.          slash(/) character.  Options may be in upper or lowercase
  2218.          and may appear on the command line in any order.  Each
  2219.          option must be separated by at least one space.
  2220.  
  2221.          A sample Anarkey installation line is shown below.
  2222.  
  2223.  
  2224.                 anarkey -f -h1000 -io
  2225.  
  2226.  
  2227.          All of Anarkey's options are described in the remainder of
  2228.          this chapter.
  2229.  
  2230.  
  2231.          Enable AKA Support
  2232.  
  2233.                  -An     Enable AKA support and allocate memory to
  2234.                          store n characters
  2235.  
  2236.          By default, AKA support is disabled to save memory.  The -A
  2237.          option enables AKA support.  The option also specifies the
  2238.          amount of memory Anarkey should reserve to store AKA
  2239.          definitions.  This number must be appended to the -A option;
  2240.          no spaces may separate them.  For example, the following
  2241.          input line enables AKA support and allocates 400 characters
  2242.          for AKA definitions.
  2243.  
  2244.  
  2245.                 anarkey -a400
  2246.  
  2247.  
  2248.          The combined memory allocated for AKA definitions, the
  2249.          history buffer (-H option) and the Unix buffer (-U) may not
  2250.          exceed 50,000 characters.  Anarkey will automatically reduce
  2251.          the memory allocated, first for Unix definitions and, if
  2252.          necessary, AKA definitions if this limit is exceeded.
  2253.  
  2254.  
  2255.          Cursor Options
  2256.  
  2257.                  -C      Never change cursor shape
  2258.                  -CN     Display non-blinking cursor
  2259.                  -CT     Display thick underscore cursor
  2260.  
  2261.          Anarkey recognizes several options to configure management
  2262.          of the cursor.
  2263.  
  2264.          The -C option instructs Anarkey to never alter the cursor's
  2265.          shape.  Normally, Anarkey will set the cursor shape based
  2266.          upon the input mode.
  2267.  
  2268.          The -CN option causes Anarkey to display a non-blinking
  2269.          cursor whenever possible.  When the cursor is beneath a
  2270.          space character, the cursor will not blink.  When beneath
  2271.          any other character, the cursor will still blink.
  2272.  
  2273.          Some EGA video cards will continue to display a blinking
  2274.          cursor despite the presence of the -CN option.  The only
  2275.          solution to this is to change video cards (preferably to a
  2276.          VGA or better).
  2277.  
  2278.          If you pop-up a resident program when the non-blinking
  2279.          cursor is active, the cursor may not be visible in the
  2280.          popped-up program.  This is a shortcoming of the resident
  2281.          program.
  2282.  
  2283.          The -C and -CN options cannot both be included on the
  2284.          command line.  If they are, the -C option overrides the -CN.
  2285.  
  2286.          The -CT option instructs Anarkey to display a thick
  2287.          underscore cursor as opposed to its normal "thin"
  2288.          underscore.  This option may be desired if the thin
  2289.          underscore is difficult to see on your display monitor.
  2290.  
  2291.          The -C and -CT options cannot both be included on the
  2292.          command line.  If they are, the -C option overrides the -CN.
  2293.  
  2294.  
  2295.          Use Expanded Memory
  2296.  
  2297.                  -E      Load Anarkey in expanded memory
  2298.  
  2299.          Anarkey can store most of its code and data, including the
  2300.          history buffer, AKA definitions and Unix program names, in
  2301.          expanded memory.  When this occurs, Anarkey takes only about
  2302.          1K of DOS memory.  To load Anarkey in expanded memory,
  2303.          include the -E option on the installation line.
  2304.  
  2305.          All versions of the Lotus-Intel-Microsoft Expanded Memory
  2306.          Specification (LIM EMS) are supported, including versions
  2307.          3.2 and 4.0.  If a valid expanded memory manager is not
  2308.          installed or there is not enough expanded memory available
  2309.          to load Anarkey, an error message will be displayed and
  2310.          Anarkey will install itself in conventional memory.
  2311.  
  2312.  
  2313.          Full History Buffer Disclosure
  2314.  
  2315.                  -F      Suppress line movement in history buffer
  2316.  
  2317.          When a line is retrieved from the history buffer and
  2318.          immediately accepted, Anarkey normally moves the line to the
  2319.          end of the buffer to prevent the storage of duplicate lines.
  2320.          If you prefer to maintain an log of input lines in the exact
  2321.          order in which they were entered, specify the -F option
  2322.          during program installation.  The -F option suppresses line
  2323.          movement in the history buffer.  Each input line will be
  2324.          entered at the bottom of the buffer.
  2325.  
  2326.  
  2327.          History Buffer Size
  2328.  
  2329.                  -Hn     Reserve n bytes of memory for history buffer
  2330.  
  2331.          The default history buffer size is 500 characters.  Using
  2332.          the -H option, the buffer size can be set to any value from
  2333.          255 through 50,000.  The size must be appended to the -H
  2334.          option with no spaces between them.  For example, the
  2335.          following line allocates 10,000 bytes for the history
  2336.          buffer.  Notice that commas should not be included in the
  2337.          option.
  2338.  
  2339.  
  2340.                 anarkey -h10000
  2341.  
  2342.  
  2343.          The combined memory allocated to the history buffer, AKA
  2344.          definitions (-A option) and the Unix buffer (-U) cannot
  2345.          exceed 50,000 bytes.  If this limit is exceeded, Anarkey
  2346.          will automatically reduce the Unix buffer size and, if
  2347.          necessary, the AKA-definition space.
  2348.  
  2349.  
  2350.          Input Mode Options
  2351.  
  2352.                  -II     Start Anarkey in insert mode (default)
  2353.                  -IO     Start Anarkey in overwrite mode
  2354.                  F       Optional modifier to force input mode at
  2355.                          start of each line
  2356.  
  2357.          By default, Anarkey first starts up in insert mode.  This is
  2358.          the same as specifying the -II option on the installation
  2359.          line.  Normally, Anarkey remains in the current input mode
  2360.          until the <Ins> key toggles the mode.  If you specify the
  2361.          -IIF option, Anarkey will force itself into insert mode
  2362.          every time it begins a new input line.
  2363.  
  2364.          The -IO option instructs Anarkey to begin operation in
  2365.          overwrite mode.  -IOF forces Anarkey into overwrite mode for
  2366.          every new input line.
  2367.  
  2368.  
  2369.          Display Memory Usage
  2370.  
  2371.                  -M      Display Anarkey memory usage
  2372.  
  2373.          The -M installation option instructs Anarkey to calculate
  2374.          and display the total amount of memory required for the
  2375.          specified configuration.  Anarkey takes into account the
  2376.          size of any buffers and whether or not expanded memory is to
  2377.          be used when it performs its calculation.
  2378.  
  2379.          When -M is specified, Anarkey does not install itself and
  2380.          remain resident.  It only calculates its memory requirement
  2381.          and displays the information.
  2382.  
  2383.          Be aware that expanded memory is allocated in 16K chunks.
  2384.          Even if only a single byte of expanded memory is needed, an
  2385.          entire 16K block must be reserved.  This is a characteristic
  2386.          of the LIM EMS specification.
  2387.  
  2388.          To help you use expanded memory wisely, Anarkey displays the
  2389.          amount of reserved, but unused, expanded memory along with
  2390.          the amount that is in use.  Any unused memory can be
  2391.          allocated to the history buffer, AKA definitions and/or Unix
  2392.          buffer without any additional memory allocation occuring.
  2393.          In effect, this is free memory.
  2394.  
  2395.          Neither expanded memory nor an expanded memory manager need
  2396.          be present to include both the -E and -M options on the
  2397.          installation line.
  2398.  
  2399.           Note: The memory requirements output by Anarkey indicate
  2400.          the amount of memory Anarkey will request from DOS before
  2401.          going resident.  In addition to this value, DOS will
  2402.          allocate a block of memory large enough to store a copy of
  2403.          every environment variable defined at that moment.  You can
  2404.          reduce the memory requirements of Anarkey (and any TSR
  2405.          program) by installing it before defining many environment
  2406.          variables.
  2407.  
  2408.          The sample installation line shown below instructs Anarkey
  2409.          to calculate how much memory it will need when configured
  2410.          with a 1000-character history buffer and 400 characters
  2411.          allocated for AKA definitions.
  2412.  
  2413.  
  2414.                 anarkey -a400 -h1000 -m
  2415.  
  2416.  
  2417.          Enable Alternative Mouse Interface
  2418.  
  2419.                  -MA     Use alternative mouse interface in pop-up
  2420.                          windows
  2421.  
  2422.          Anarkey supports two different mouse interfaces when
  2423.          processing a pop-up window.  The default interface has been
  2424.          described in the earlier chapters of this manual.  The
  2425.          alternative interface is discussed in Appendix I.  To enable
  2426.          the alternative mouse interface, include the -MA option on
  2427.          Anarkey's command-line during installation.
  2428.  
  2429.  
  2430.          Disable Multiple-Command Lines
  2431.  
  2432.                  -O      Disable multiple-command lines
  2433.  
  2434.          Anarkey normally allows multiple commands to be entered on a
  2435.          single input line as documented in Chapter 7.  The -O option
  2436.          disables multiple-command lines entered on the input line.
  2437.          Multiple commands are still allowed in AKA definitions.
  2438.  
  2439.          Multiple commands can also be repressed on a per-line basis
  2440.          by pressing <F10> or <Ctrl-R>.  Refer to Chapter 7 for
  2441.          additional information on multiple-command lines.
  2442.  
  2443.  
  2444.          Anarkey Process Number
  2445.  
  2446.                  -Pn     Set Anarkey process number to n
  2447.  
  2448.          During installation, Anarkey assigns itself a default
  2449.          process number.  This process number is used to determine
  2450.          whether or not Anarkey is already resident.  This basically
  2451.          prevents the loading of duplicate copies of Anarkey.
  2452.  
  2453.          There are two instances when you will want to assign Anarkey
  2454.          a new process number: (1) when another TSR program uses
  2455.          Anarkey's default number and (2) when you wish to purposely
  2456.          load multiple copies of Anarkey.  The first scenario is
  2457.          possible, but highly unlikely.  It will make itself known by
  2458.          Anarkey's failure to install even one copy of itself and
  2459.          report that it is already resident.
  2460.  
  2461.          You may wish to purposely install multiple copies of Anarkey
  2462.          if you use DesqView or Microsoft Windows in their non-386
  2463.          modes.  Instructions on how to use Anarkey in these
  2464.          environments are included in Chapter 12.
  2465.  
  2466.          When you assign a new process number to Anarkey, the number
  2467.          is appended to the -P option with no spaces between them.
  2468.          Valid process numbers are 0 through 63.  By default, Anarkey
  2469.          uses process number 35.
  2470.  
  2471.          Be aware that if you change Anarkey's process number, you
  2472.          will have to specify the new process number on the Load and
  2473.          Anarkmd program's command lines every time you run them.
  2474.          This is because those programs require Anarkey to be
  2475.          installed in order to perform their tasks and the process
  2476.          number is needed to determine Anarkey installation.  The
  2477.          Load and Anarkmd programs are discussed in Chapters 14 and
  2478.          16, respectively.
  2479.  
  2480.          The following line installs Anarkey with the process number
  2481.          14.
  2482.  
  2483.  
  2484.                 anarkey -p14
  2485.  
  2486.  
  2487.          Note: Never use the -P option if running the TSR version of
  2488.          the QEdit text editor from SemWare.  QEdit TSR contains
  2489.          dedicated Anarkey support which requires Anarkey to use its
  2490.          default process number.  This is only applicable to the TSR
  2491.          version of QEdit and not other QEdit implementations.
  2492.  
  2493.  
  2494.          Quiet Mode
  2495.  
  2496.                  -Q      Run in quiet mode
  2497.  
  2498.          Anarkey will occasionally sound the system bell, for
  2499.          instance, after cycling through the list of possible
  2500.          filename or line completions.  To suppress these beeps and
  2501.          run in quiet mode, include the -Q option on the installation
  2502.          line.  However, even in quiet mode, Anarkey still beeps in
  2503.          error situations where no other form of notification is
  2504.          provided.  Such situations are when an AKA or Unix program
  2505.          name is defined, but there is not enough memory left in the
  2506.          respective buffer to store it.
  2507.  
  2508.  
  2509.          Suppress Line Redisplay
  2510.  
  2511.                  -R      Do not redisplay accepted lines
  2512.  
  2513.          When an input line is accepted, Anarkey normally redisplays
  2514.          the line onscreen so as to allow any redirection to the
  2515.          printer to occur.  (Redirection to the printer is
  2516.          implemented in DOS by pressing <Ctrl-P>.  Refer to your DOS
  2517.          manual for further details.)
  2518.  
  2519.          This redisplay is annoying when a voicebox is connected to
  2520.          the system because the user hears each input line twice.  To
  2521.          suppress line redisplay, include the -R option on the
  2522.          installation line.  However, be aware that doing so prevents
  2523.          input-line printer redirection from occurring.
  2524.  
  2525.  
  2526.          History Buffer Minimum Line Length
  2527.  
  2528.                  -Sn     Save input lines at least n characters in
  2529.                          length to history buffer
  2530.  
  2531.          By default, Anarkey saves all non-empty lines in the history
  2532.          buffer.  However, very short lines of one or two characters
  2533.          are probably easier to retype than to retrieve from the
  2534.          buffer.  Rather than clutter the history buffer with these
  2535.          short lines, they can be excluded from the buffer via the -S
  2536.          option.
  2537.  
  2538.          Appended to the -S option must be the input line's minimum
  2539.          length for Anarkey to store it in the buffer.  No spaces can
  2540.          separate the -S from the length value.
  2541.  
  2542.          For example, the following line instructs Anarkey to store
  2543.          only lines of three or more characters in the history buffer.
  2544.  
  2545.  
  2546.                 anarkey -s3
  2547.  
  2548.  
  2549.          Unix Switchar Support
  2550.  
  2551.                  -U      Enable Unix switchar support
  2552.                  -Un     Enable Unix switchar support, allocate Unix
  2553.                          buffer of n characters
  2554.                  -US     Translate slash character(/) only, leave
  2555.                          dash character(-) unmodified
  2556.  
  2557.          The various -U options provide levels of support for the
  2558.          Unix switchar conventions.  Details about this topic are
  2559.          discussed in Chapter 10.
  2560.  
  2561.          The -U option enables Unix switchar support and allocates a
  2562.          Unix buffer of 25 characters.
  2563.  
  2564.          The -Un option also enables Unix switchar support, but the
  2565.          size of the Unix buffer is specified immediately after the
  2566.          option.  No spaces may separate the -U from the buffer size.
  2567.  
  2568.          Buffer size is specified in number of characters and can be
  2569.          any value up to 50,000.  Note however, that the combined
  2570.          memory allocated for the history buffer, AKA definitions and
  2571.          Unix buffer cannot exceed 50,000 bytes.  If it does, Anarkey
  2572.          will automatically reduce the size of the Unix buffer and,
  2573.          if necessary, the AKA storage area to meet the limit.
  2574.  
  2575.          The -US option instructs Anarkey to convert any slash(/)
  2576.          characters on the input line to backslashes(\).  Dash
  2577.          characters are left unmodified.  In effect, this allows
  2578.          slashes to be used as a path separator in filenames.
  2579.  
  2580.          The -US option is leftover from earlier versions of Anarkey
  2581.          that did not provide the extensive Unix switchar support
  2582.          found in the current version.  Even though it is still
  2583.          supported, the comprehensive Unix support described in
  2584.          Chapter 10 is preferable to the limited support provided by
  2585.          the -US option.
  2586.  
  2587.          The following command line installs Anarkey with a
  2588.          150-character Unix buffer.
  2589.  
  2590.  
  2591.                 anarkey -u150
  2592.  
  2593.  
  2594.          Ignored File Extensions
  2595.  
  2596.                  -X\     Do not ignore any file extensions
  2597.                  -Xext   Ignore files with ext extension
  2598.  
  2599.          Anarkey usually ignores files with certain extensions when
  2600.          it is choosing a filename completion.  This operation is
  2601.          described in Chapter 6.
  2602.  
  2603.          The -X\ option instructs Anarkey to not ignore any file
  2604.          extensions when completing a filename.  In effect, this
  2605.          clears the list of ignored file extensions.
  2606.  
  2607.          Additional extensions can be added to the list of ignored
  2608.          extensions by specifying them with the -X option.  Append
  2609.          the extension, with no intervening spaces, to the -X option.
  2610.          The DOS wildcard characters '?' and '*' are allowed in the
  2611.          extension.  The Anarkey installation line may contain up to
  2612.          six (6) -X options.
  2613.  
  2614.          The following line adds the extensions .BAT and .Q* to the
  2615.          ignored-extensions list.
  2616.  
  2617.  
  2618.                 anarkey -xbat -xq*
  2619.  
  2620.  
  2621.          Both the -X\ and -Xext options may be specified on the same
  2622.          installation line.  The -X\ option clears the default
  2623.          ignored-extensions list.  Any -Xext options after -X\ are
  2624.          then added to the list.
  2625.  
  2626.          The next line instructs Anarkey to ignore only files with a
  2627.          .TXT extension.
  2628.  
  2629.  
  2630.                 anarkey -x\ -xtxt
  2631.  
  2632.  
  2633.  
  2634.          Chapter 12
  2635.  
  2636.          Microsoft Windows and DesqView
  2637.  
  2638.          Anarkey is compatible with the Microsoft Windows and
  2639.          Quarterdeck DesqView environments.  Important considerations
  2640.          when running each of these programs are discussed in this
  2641.          chapter.
  2642.  
  2643.          Microsoft Windows
  2644.  
  2645.          Anarkey contains dedicated support for Microsoft Windows
  2646.          v3.0 and later.  Anarkey runs in a DOS session with Windows
  2647.          operating in any of its modes (real, standard and
  2648.          386-enhanced).
  2649.  
  2650.          When running Windows in real or standard modes, install
  2651.          Anarkey in each DOS session after beginning the session.
  2652.          Anarkey can already be installed when you start Windows, but
  2653.          that copy of it will be ignored while in Windows, even in a
  2654.          Windows DOS session.  When you terminate a DOS session by
  2655.          typing "exit," that session's copy of Anarkey is
  2656.          automatically removed from memory.
  2657.  
  2658.          Things are quite a bit different when running Windows in its
  2659.          386-enhanced mode.  Anarkey is aware of the Windows 386 mode
  2660.          and provides special support for each open DOS session.
  2661.  
  2662.          However, if you are going to run Windows in 386 mode,
  2663.          Anarkey must not be using expanded memory.  This means do
  2664.          not include the -E option on the Anarkey installation line.
  2665.          If Anarkey is using expanded memory and you attempt to
  2666.          execute Windows in 386 mode, Anarkey will terminate the
  2667.          Windows session and display an error message.  Either run
  2668.          Windows in another mode or reinstall Anarkey without the -E
  2669.          option.
  2670.  
  2671.          When running Windows in 386 mode, install Anarkey before
  2672.          starting Windows.  When Windows begins, a snapshot is taken
  2673.          of Anarkey's current status, including the history buffer
  2674.          contents, AKA definitions and Unix program names.  Then
  2675.          every time a new DOS session is opened under Windows, it is
  2676.          initialized to this saved status.  There is no need to
  2677.          reinstall Anarkey in each DOS session; it is installed and
  2678.          initialized automatically.
  2679.  
  2680.          Multiple DOS sessions can be open simultaneously and Anarkey
  2681.          will operate in each one.  However, each session maintains
  2682.          its own separate copy of data, including history buffer and
  2683.          AKA definitions.  For example, if you enter an input line in
  2684.          one DOS session, attempting to retrieve it from another
  2685.          session will fail because the line was saved in the other
  2686.          session's history buffer.  This is also true for AKA
  2687.          definitions and the Unix buffer.  Thus, it is a good idea to
  2688.          perform all buffer initializations and AKA definitions
  2689.          before starting Windows.
  2690.  
  2691.          When a DOS session is terminated, its copy of Anarkey is
  2692.          automatically removed from memory.
  2693.  
  2694.          DesqView
  2695.  
  2696.          Anarkey is compatible with DesqView and DesqView 386 and can
  2697.          run in a DOS window in either environment.  As far as Anarkey
  2698.          is concerned, there is no difference between DesqView and
  2699.          DesqView 386; the remainder of this discussion applies to both
  2700.          environments.
  2701.  
  2702.          When a DesqView DOS window is opened, Anarkey will not be
  2703.          active within it, even if Anarkey was loaded prior to running
  2704.          DesqView. A copy of Anarkey must be installed in each DOS
  2705.          window for it to be active.
  2706.  
  2707.          If Anarkey was not installed prior to running DesqView, it can
  2708.          be installed in multiple DOS windows without specifying any
  2709.          special options. When a DOS window is closed, its copy of
  2710.          Anarkey is removed from memory automatically.
  2711.  
  2712.          If you want Anarkey active outside of DesqView *and* in each
  2713.          DesqView DOS window, a little more work (but only a little) is
  2714.          necessary.  Anarkey stills needs to be installed separately in
  2715.          each DOS window.  In other words, multiple copies of Anarkey
  2716.          are installed into memory.
  2717.  
  2718.          It is useful to categorize these multiple copies into two
  2719.          groups: copies loaded in DesqView DOS windows and the single
  2720.          copy loaded outside DesqView. One of these groups must use the
  2721.          -P option when installing Anarkey.  The -P option assigns a
  2722.          process number to Anarkey which allows multiple copies of it to
  2723.          be installed.  Appended to -P must be the assigned process
  2724.          number, for example, -P1.  Refer to Chapter 11, page 38 of the
  2725.          "Anarkey User Manual" for more information concerning the -P
  2726.          option.
  2727.  
  2728.          This is most easily understood by an example.  Say the Anarkey
  2729.          copy outside of DesqView was installed without the -P option.
  2730.          Then all Anarkey copies loaded within DesqView DOS windows must
  2731.          be installed with -P.  The process number specified with -P can
  2732.          be the same for each DOS window, for example, you can use -P1
  2733.          in each window.  This is handy because it allows you to use the
  2734.          same initialization file for each DOS window.
  2735.  
  2736.          Conversely, say the Anarkey copy outside DesqView was installed
  2737.          with -P. Then the Anarkey copies loaded within DOS windows do
  2738.          not need -P options. It all breaks down to the two groups:
  2739.          Anarkey copies installed outside DesqView and those installed
  2740.          inside DesqView.  One group must use -P options, the other does
  2741.          not.
  2742.  
  2743.  
  2744.  
  2745.          Chapter 13
  2746.  
  2747.          Anarked, the Anarkey Keystroke Editor
  2748.  
  2749.          Anarked allows you to change Anarkey's default key
  2750.          assignments.  For example, if you want to display the help
  2751.          window by pressing <F1> instead of the default <Alt-F1>,
  2752.          Anarked lets you do so.  Any Anarkey keystroke, except those
  2753.          used during processing of a pop-up window, may be reassigned
  2754.          with Anarked.
  2755.  
  2756.          Anarked modifies the ANARKEY.COM program file.  Therefore,
  2757.          new key assignments made with Anarked are not active until
  2758.          you run the modified Anarkey program.
  2759.  
  2760.          Running Anarked
  2761.  
  2762.          Execute Anarked from the DOS command prompt.  When executed,
  2763.          Anarked prompts for the specification of the ANARKEY.COM
  2764.          program to process.  If ANARKEY.COM is not in the current
  2765.          directory, its location must be specified.  A default spec
  2766.          is displayed in [] brackets.  To accept the default, press
  2767.          <Enter>.  Otherwise, type the appropriate filename and press
  2768.          <Enter>.
  2769.  
  2770.          Anarked verifies that the entered filename is a valid
  2771.          ANARKEY.COM program file.  If it is not, Anarked refuses to
  2772.          accept it and prompts you for a new file spec.
  2773.  
  2774.          Anarked recognizes one optional command-line argument, -U.
  2775.          -U is used if you are upgrading from a previous version of
  2776.          Anarkey.  It allows you to carry over key assignments from
  2777.          one version to another, saving you from assigning them again.
  2778.  
  2779.          When -U is specified, Anarked prompts for two file
  2780.          specifications: (1) the old ANARKEY.COM file and (2) the new
  2781.          ANARKEY.COM file to receive the transferred key assignments.
  2782.          Again, Anarked checks both files for validity before
  2783.          agreeing to process them.  If both files are valid Anarkey
  2784.          programs, the key assignments of the first program spec are
  2785.          copied to the second spec.
  2786.  
  2787.          Occasionally, a new release of Anarkey adds new functions
  2788.          not available in the previous version.  When upgrading with
  2789.          -U, the default key assignments to all new functions are
  2790.          cleared so the new functions are not assigned to any keys.
  2791.          This is done to prevent the possibility of conflicting key
  2792.          assignments between the new version and the modified, older
  2793.          version.  When Anarked begins processing, it displays a list
  2794.          all new functions added to the new version.  You will have
  2795.          to assign keys to those functions if you wish to use them.
  2796.          Note: This requirement is only necessary when upgrading with
  2797.          the -U option.
  2798.  
  2799.          After all requested input files have been entered, Anarked
  2800.          prompts for the name of the output file.  Any changes made
  2801.          during the forthcoming Anarked session will be saved in this
  2802.          output file.  A default filename is displayed within []
  2803.          brackets.  Press <Enter> to accept the default or enter
  2804.          another filename.
  2805.  
  2806.          With all input and output files specified, Anarked enters
  2807.          edit mode where Anarkey key assignments are modified.
  2808.  
  2809.          Anarked Edit Mode
  2810.  
  2811.          Anarkey key assignments are modified in Anarked's edit mode.
  2812.          In edit mode, a full-screen window is displayed which lists
  2813.          several Anarkey functions and their current key assignments.
  2814.  
  2815.          Each line in the window contains one Anarkey function.  The
  2816.          function's description is displayed on the left half of the
  2817.          line.  Alongside the description are two columns which
  2818.          display the function's current key assignments.  Key
  2819.          assignments are surrounded by <> brackets, as in <F1>.  If
  2820.          no key is assigned to the function, empty <> brackets are
  2821.          displayed.  Each function may have a maximum of two keys
  2822.          assigned to it.
  2823.  
  2824.          Anarkey's functions are spread over several windows.  You
  2825.          can view the next window by pressing <PgDn>.  Press <PgUp>
  2826.          to view the previous window.
  2827.  
  2828.          One key assignment in the window is displayed in reverse
  2829.          video (i.e. black characters on a white background) and is
  2830.          referred to as the current key assignment.  Other
  2831.          assignments in the window can be made current by pressing
  2832.          the <Up>, <Down>, <Left> and <Right> arrow keys.
  2833.  
  2834.          Key assignments are modified by first making the assignment
  2835.          you wish to modify the current key assignment.  Then press
  2836.          the key sequence you wish to assign to the function.  For
  2837.          example, to change the help window's key assignment from
  2838.          <Alt-F1> to <F1>, use the <PgUp>, <PgDn> and arrow keys to
  2839.          make the <Alt-F1> field the current key assignment.  Then
  2840.          press <F1>.  The new key assignment replaces any previous
  2841.          assignment.
  2842.  
  2843.          Nearly any keystroke recognized by DOS can be assigned to an
  2844.          Anarkey function.  This includes the function keys and key
  2845.          sequences combining one of the <Alt>, <Ctrl> or <Shift>
  2846.          keys.  WordStar-like multiple-character key sequences, such
  2847.          as <Ctrl-KS>, are not supported.
  2848.  
  2849.          Because DOS handles the <Ctrl-C> and <Ctrl-P> keystrokes
  2850.          itself (to abort a program and redirect output to a printer,
  2851.          respectively), these keys may not be assigned to Anarkey
  2852.          functions.
  2853.  
  2854.          Also, a key may not be assigned to more than one function.
  2855.          If the key being assigned is already assigned to another
  2856.          function, Anarked displays a window stating the key's
  2857.          current assignment and asks if you wish to remove it.  If
  2858.          you respond positively, the key is removed from its old
  2859.          function assignment and assigned to the current function.
  2860.  
  2861.          A key assignment can be explicitly removed by making it the
  2862.          current assignment and pressing <Ctrl-@>.  Key assignments
  2863.          can also be removed by going through the Anarked action menu
  2864.          described in the next section.  Note: The TOPS local area
  2865.          network does not correctly handle <Ctrl-@> keystrokes.
  2866.          Thus, to remove key assignments, either UNLOAD TOPS or use
  2867.          the action menu function described in the next section.
  2868.  
  2869.          The Anarked Action Menu
  2870.  
  2871.          The Anarked action menu provides operations not available in
  2872.          edit mode.  Press the <Esc> key to display the action menu.
  2873.  
  2874.          The action menu lists several operations.  One operation,
  2875.          the current item, is displayed in reverse video.  A menu
  2876.          operation is invoked by using the <Up> and <Down> arrow keys
  2877.          to make it the current item and then pressing <Enter>.  Some
  2878.          operations are executed immediately, while others prompt for
  2879.          additional input.
  2880.  
  2881.          The action menu can be exited by pressing <Esc> again.
  2882.  
  2883.  
  2884.          Save changes and quit
  2885.  
  2886.          Select this menu item to save your key assignments to the
  2887.          output file specified upon program startup.  The new
  2888.          assignments will be in effect the next time Anarkey is
  2889.          installed.
  2890.  
  2891.          Anarked terminates after saving the key assignments.
  2892.  
  2893.  
  2894.          Create summary list
  2895.  
  2896.          This operation creates an ASCII text file listing all the
  2897.          Anarkey functions and their key assignments.  This file is
  2898.          suitable for printing and can be displayed in Anarkey's
  2899.          pop-up help window.  Refer to Chapter 2 for information
  2900.          about the help window.
  2901.  
  2902.          Anarked prompts for the name of the file to create.  The
  2903.          default file name is the output filename specified at
  2904.          startup with a .SUM extension.  Press <Enter> to accept the
  2905.          default or enter another filename.
  2906.  
  2907.          Alternatively, the file can be sent directly to the printer
  2908.          instead of a disk file by entering "PRN" when prompted for
  2909.          the filename.  However, be sure the printer is turned on
  2910.          before sending the file to it.
  2911.  
  2912.          Press <F1> to abort the operation without creating a summary
  2913.          list.
  2914.  
  2915.  
  2916.          Assign key
  2917.  
  2918.          Since the <Esc>, <PgUp>, <PgDn> and arrow keys are
  2919.          intercepted and interpreted by Anarked, assigning them to an
  2920.          Anarkey function requires that you go through this operation
  2921.          of the action menu.
  2922.  
  2923.          Anarked prompts for the key to assign to the
  2924.          current-key-assignment field.  Any key you press, including
  2925.          <Esc>, <PgUp>, <PgDn> or the arrow keys, is assigned to the
  2926.          field.
  2927.  
  2928.          Press <F1> to abort the operation and return to edit mode.
  2929.  
  2930.  
  2931.          Remove keystroke (<Ctrl-@>)
  2932.  
  2933.          When this operation is executed, the current-key-assignment
  2934.          field is cleared.  This is identical to pressing <Ctrl-@>.
  2935.  
  2936.  
  2937.          Quit Anarked without save
  2938.  
  2939.          This operation terminates Anarked without saving any
  2940.          modified key assignments.
  2941.  
  2942.          Keyboard Considerations
  2943.  
  2944.          Anarked recognizes the same keystrokes the DOS operating
  2945.          system recognizes.  Be aware that even though your keyboard
  2946.          may include <F11> and <F12> keys does not necessarily mean
  2947.          you can use them.  If DOS does not recognize a keystroke,
  2948.          neither does Anarked.
  2949.  
  2950.          This problem can be resolved by running the 101-Keys program
  2951.          distributed with Anarkey.  101-Keys provides support for
  2952.          enhanced keyboards.  It lets Anarked and other programs
  2953.          recognize keystrokes DOS does not normally support,
  2954.          including the <F11> and <F12> keys.  101-Keys is described
  2955.          in Chapter 15.
  2956.  
  2957.  
  2958.  
  2959.          Chapter 14
  2960.  
  2961.          Load, the Anarkey Load Utility
  2962.  
  2963.          The Load program reads an ASCII text file and processes each
  2964.          line as if it were entered at the DOS prompt.  The
  2965.          difference is that the lines are not executed; they are only
  2966.          stored in the history buffer.  Thus, Load provides a method
  2967.          to initialize the history buffer.
  2968.  
  2969.          Also, if the text file contains AKA definitions or Unix
  2970.          program names, Load will process and save them in the
  2971.          appropriate manner.  So you don't have to type in your AKA
  2972.          definitions and Unix programs at the start of every session,
  2973.          it is a good idea to store them in a text file and then have
  2974.          Load process the file during AUTOEXEC.BAT initialization.
  2975.          The Anarkmd program can create these files for you using the
  2976.          AKAs and Unix programs existing at the time it is executed.
  2977.          Anarkmd is discussed in Chapter 16.  You can also tell Load
  2978.          to not process AKA definitions and Unix programs by
  2979.          including the -D option on the command line.  Load options
  2980.          are explained later in this chapter.
  2981.  
  2982.          Running Load
  2983.  
  2984.          Anarkey must be installed prior to running Load.  The only
  2985.          exception to this is when Load is executed with the -M
  2986.          option, explained below.  Once Anarkey is installed, Load
  2987.          can be executed at any time and any number of times.  Load
  2988.          can be executed as part of a multiple-command line, but it
  2989.          must be the very last command in the line.  Any commands
  2990.          following Load in a multiple-command line are ignored.
  2991.  
  2992.          Load command-line syntax is shown below.
  2993.  
  2994.  
  2995.                 LOAD [-options] filename [filename...]
  2996.  
  2997.  
  2998.          If Load is executed with no arguments, a usage message is
  2999.          displayed.
  3000.  
  3001.          Load command-line options are not required.  When specified,
  3002.          an option instructs Load to operate in a different manner
  3003.          than it normally does.  Recognized options are described in
  3004.          the next section.
  3005.  
  3006.          Load processes all filenames specified on the command line.
  3007.          Filenames may contain the DOS wildcard characters '*' and
  3008.          '?'.  Each file must be an ASCII text file.
  3009.  
  3010.          Load ignores all lines in the file which are empty or have a
  3011.          first word of "REM."  The remaining lines are stored in the
  3012.          history buffer, unexecuted.  AKA definitions (identified by
  3013.          a colon(:) as the line's first character) are processed and
  3014.          added to the list of AKAs.  If there is not enough room to
  3015.          store the AKA, Load beeps, displays an error message and
  3016.          continues processing the remainder of the file.  Likewise,
  3017.          Unix program names (specified by an exclamation point(!) as
  3018.          the line's first character) are saved in the Unix buffer.
  3019.          Load rejects lines longer than 255 characters or containing
  3020.          commands of more than 127 characters.
  3021.  
  3022.          Command-Line Options
  3023.  
  3024.          Load options modify Load's default operation.  Options may
  3025.          appear anywhere on the command line.  Each must be preceded
  3026.          by a dash(-) character.  Options may be in upper- or
  3027.          lowercase.  Recognized options are described below.
  3028.  
  3029.  
  3030.          Suppress Processing of AKA Definitions and Unix Programs
  3031.  
  3032.                  -D      Do not process AKA definitions and Unix
  3033.                          program names
  3034.  
  3035.          Normally, Load processes an AKA definition or Unix program
  3036.          name just as if it had been entered on the input line.
  3037.          However, sometimes the processed file may contain
  3038.          definitions that were defined temporarily and are no longer
  3039.          desired.  This can occur when the history buffer from a
  3040.          previous session is saved and then restored.
  3041.  
  3042.          Such definitions can be ignored during Load processing by
  3043.          including -D on the command line.  With -D specified, AKA
  3044.          definitions and Unix program names are ignored; they are not
  3045.          defined or stored in the Unix or history buffers.
  3046.  
  3047.  
  3048.          Fast-Load Operation
  3049.  
  3050.                  -F      Load disk file as quickly as possible,
  3051.                          bypassing any error checking
  3052.  
  3053.          Load normally performs extensive error checking on each line
  3054.          it processes.  For example, the line's length is checked to
  3055.          verify it is not too long and sufficient space to store an
  3056.          AKA definition or Unix program name is checked.  If any
  3057.          errors occur, Load displays a message explaining the problem.
  3058.  
  3059.          The Load error checking can take a significant amount of
  3060.          time.  If you are confident the processed file contains no
  3061.          problems, time can be saved by performing a fast-load
  3062.          operation.  Fast-load is activated by specifying the -F
  3063.          option on the command line.  In fast-load, error checking is
  3064.          bypassed and an optimized Load is performed.  Fast-load is
  3065.          significantly quicker than Load's normal processing.
  3066.  
  3067.  
  3068.          Calculate Space used by AKA Definitions and Unix Program
  3069.          Names
  3070.  
  3071.                  -M      Display AKA and Unix program space
  3072.                          requirements
  3073.  
  3074.          When first configuring Anarkey, it is common to create files
  3075.          containing AKA definitions and Unix program names, install
  3076.          Anarkey and then have Load process the files.  But before
  3077.          installing Anarkey, it's useful to know how much space to
  3078.          allocate for AKA definitions and the Unix buffer.  Load can
  3079.          provide this information by processing the files with the -M
  3080.          option.
  3081.  
  3082.          With -M on the command line, Load reads the contents of the
  3083.          file and accumulates the number of characters required for
  3084.          AKA definitions and Unix program names.  It does not process
  3085.          the file in any other way.  In other words, the file is not
  3086.          loaded into Anarkey's history buffer and AKA definitions and
  3087.          Unix program names are not saved.  When all specified files
  3088.          have been read, Load displays the total amount of space
  3089.          Anarkey will need to store the AKA definitions and Unix
  3090.          program names.  These values can then be used in the Anarkey
  3091.          -A and -U options, respectively, to reserve Anarkey memory
  3092.          during installation.
  3093.  
  3094.          Anarkey does not have to be installed prior to running Load
  3095.          with the -M option.
  3096.  
  3097.  
  3098.          Anarkey Process Number
  3099.  
  3100.                  -Pn     Anarkey's process number is n
  3101.  
  3102.          The Load -P option is identical to the -P recognized by
  3103.          Anarkey.  This option is only necessary in rare situations.
  3104.          Refer to the discussion of the Anarkey -P option in Chapter
  3105.          11 for information on when to use it.
  3106.  
  3107.  
  3108.          Execute in Quiet Mode
  3109.  
  3110.                  -Q      Suppress messages
  3111.  
  3112.          When -Q is included on Load's command line, informational
  3113.          messages, such as the name of the file being processed, are
  3114.          not displayed.  However, error messages are still displayed.
  3115.  
  3116.  
  3117.  
  3118.          Chapter 15
  3119.  
  3120.          101-Keys, Support for Enhanced Keyboards
  3121.  
  3122.          Many DOS computers come equipped with an enhanced,
  3123.          101/102-key keyboard.  This is the keyboard with <F11> and
  3124.          <F12> keys.  Unfortunately, at the time of this writing, the
  3125.          DOS operating system does not support the extra keys
  3126.          available on these enhanced keyboards.  The 101-Keys program
  3127.          solves this problem.
  3128.  
  3129.          101-Keys is a small resident program.  It allows full
  3130.          recognition of enhanced keys typed at the DOS command prompt
  3131.          and within application programs that normally do not support
  3132.          101-key keyboards.  With 101-Keys, programs such as Anarkey
  3133.          and Anarked recognize many new keystrokes, including <F11>,
  3134.          <F12> and combinations of those keys pressed with <Ctrl>,
  3135.          <Alt> or the <Shift> keys.  Even though 101-Keys is
  3136.          distributed with Anarkey, it provides enhanced keyboard
  3137.          support for most application programs that do not normally
  3138.          support such keyboards.
  3139.  
  3140.          Installation
  3141.  
  3142.          To install 101-Keys, execute it from the DOS command prompt
  3143.          or a batch file, such as AUTOEXEC.BAT.  101-Keys installs
  3144.          itself and terminates while remaining resident.
  3145.  
  3146.          An enhanced keyboard must be present on the system.  If
  3147.          101-Keys does not find an enhanced keyboard, it displays an
  3148.          error message and terminates without remaining resident.
  3149.  
  3150.          Once installed, no additional action is required.  From that
  3151.          point, Anarkey, Anarked and most application programs will
  3152.          recognize the new keystrokes supported by enhanced keyboards.
  3153.  
  3154.          101-Keys can be disabled by executing it again with the
  3155.          argument "OFF" on the command line.  To enable it, run with
  3156.          a command line of "ON."  Temporarily disabling 101-Keys can
  3157.          be a workaround if a program incompatible with 101-Keys is
  3158.          discovered (which is unlikely).  As an example, if the
  3159.          program "incomp" does not work with 101-Keys active, the
  3160.          following AKA definition temporarily disables 101-Keys
  3161.          whenever it is run.
  3162.  
  3163.  
  3164.                 :incomp 101-keys off ; incomp %1 %2 %3 ; 101-keys on
  3165.  
  3166.          101-Keys and Other Programs
  3167.  
  3168.          Some programs need to be specially configured for them to
  3169.          recognize the additional keys 101-Keys provides.  All such
  3170.          known program configurations are described in this section.
  3171.  
  3172.          BRIEF Programmer's Text Editor
  3173.  
  3174.          The BFLAGS environment variable must be defined and include
  3175.          the string "-D101key."  This informs BRIEF to expect and
  3176.          properly handle the enhanced-keyboard input it may receive.
  3177.  
  3178.  
  3179.          New 101-Key Keystrokes
  3180.  
  3181.          The following list details the new keystrokes that programs
  3182.          recognize with 101-Keys installed.
  3183.  
  3184.  
  3185.          Stand-Alone Keys       Alt-Keys       Ctrl-Keys    Shift-Keys
  3186.          ----------------       --------       ---------    ----------
  3187.          F11                    Alt-F11        Ctrl-F11     Shift-F11
  3188.          F12                    Alt-F12        Ctrl-F12     Shift-F12
  3189.                                 Alt-Up Arrow   Ctrl-Up Arrow
  3190.                                 Alt-Down Arrow Ctrl-Down Arrow
  3191.                                 Alt-Left Arrow
  3192.                                 Alt-Right Arrow
  3193.                                 Alt-Home
  3194.                                 Alt-End
  3195.                                 Alt-Page Up
  3196.                                 Alt-Page Down
  3197.                                 Alt-Keypad /   Ctrl-Keypad /
  3198.                                 Alt-Keypad *   Ctrl-Keypad *
  3199.                                 Alt-Keypad -   Ctrl-Keypad -
  3200.                                 Alt-Keypad +   Ctrl-Keypad +
  3201.                                 Alt-Keypad Enter
  3202.                                 Alt-Insert     Ctrl-Insert
  3203.                                 Alt-Delete     Ctrl-Delete
  3204.          Keypad 5                              Ctrl-Keypad 5
  3205.                                 Alt-Backspace
  3206.                                 Alt-Enter
  3207.                                 Alt-Esc
  3208.                                 Alt-Tab        Ctrl-Tab
  3209.                                 Alt-`
  3210.                                 Alt-[
  3211.                                 Alt-]
  3212.                                 Alt-;
  3213.                                 Alt-'
  3214.                                 Alt-,
  3215.                                 Alt-.
  3216.                                 Alt-/
  3217.                                 Alt-\
  3218.  
  3219.  
  3220.  
  3221.          Chapter 16
  3222.  
  3223.          Anarkmd, the Anarkey Command-Line Utility
  3224.  
  3225.          In previous chapters, all Anarkey functions were executed by
  3226.          pressing keys.  However, some of Anarkey's operations can
  3227.          also be executed by running the Anarkmd program (pronounced
  3228.          "anar-command").
  3229.  
  3230.          There are three advantages gained from this capability: (1)
  3231.          It makes Anarkey functions available in situations where
  3232.          they are not normally available, (2) some of the functions
  3233.          Anarkmd implements are improvements over what Anarkey itself
  3234.          provides and (3) Anarkmd can provide functions used by
  3235.          Anarkey, thereby saving Anarkey from having to provide such
  3236.          functions itself.
  3237.  
  3238.          To explain the first advantage, recall that Anarkey does not
  3239.          process batch-file lines, therefore, features such as AKAs
  3240.          and multiple-command lines cannot be used in them.  However,
  3241.          Anarkmd can be executed from a batch file and thus provides
  3242.          an indirect way to execute an AKA or multiple-command line.
  3243.  
  3244.          Also, when Anarkey writes the history buffer to a disk file,
  3245.          it always saves it in a file called ANARKEY.LOG located in
  3246.          the current directory of the current drive.  (Check Chapter
  3247.          4 if you need to refresh your memory on this.)  Anarkmd adds
  3248.          the ability to specify the file's drive, directory and/or
  3249.          name, making it more flexible than the related Anarkey
  3250.          function.
  3251.  
  3252.          Finally, all of Anarkey's pop-up window functions, like the
  3253.          help and history-buffer windows, are actually implemented in
  3254.          Anarkmd.  Anarkey simply executes Anarkmd whenever a window
  3255.          function is invoked.  This saves a large amount of memory
  3256.          because none of the window-handling code needs to be
  3257.          resident.
  3258.  
  3259.          Running Anarkmd
  3260.  
  3261.          Anarkmd can be executed from the DOS command prompt, a batch
  3262.          file or an AKA.  Anarkmd cannot be run as part of a
  3263.          multiple-command line unless it is the last command in the
  3264.          line.  If it is not the last command, all trailing commands
  3265.          on the line are ignored.
  3266.  
  3267.          Anarkmd accepts two types of arguments: (1) a command-line
  3268.          option or (2) an input line to execute.  Command-line
  3269.          options are used to indicate the Anarkey function to
  3270.          execute.  Input lines are used to execute an AKA or
  3271.          multiple-command line from a batch file.  Only one type of
  3272.          argument can be passed to Anarkmd, either an option or a
  3273.          line to execute.
  3274.  
  3275.          Command-Line Options
  3276.  
  3277.          Options are prefaced by a dash(-) character, may be in
  3278.          upper- or lowercase and may be specified in any order on the
  3279.          command line.  Each Anarkmd option is described in the
  3280.          remainder of this section.
  3281.  
  3282.  
  3283.          Invoke an Anarkey Function
  3284.  
  3285.                  -Fx     Execute the Anarkey function specified by x
  3286.  
  3287.          The -F option informs Anarkmd of the Anarkey function to
  3288.          execute.  Only one -F option may be specified on the command
  3289.          line.
  3290.  
  3291.          Attached to the -F option is a function name.  No spaces may
  3292.          separate the -F from the function name.  Anarkmd recognizes
  3293.          several function names, but it only looks at the first two
  3294.          characters of the name to determine its identity.  Thus, you
  3295.          may abbreviate each of the following function names by
  3296.          specifying only its first two characters.  Function name can
  3297.          be in upper- or lowercase.
  3298.  
  3299.          Here is a list of recognized function names, followed by a
  3300.          description of each.  Since all of these functions have
  3301.          already been documented in previous chapters, they are only
  3302.          outlined here.  Refer to previous chapters for complete
  3303.          details of a particular function.
  3304.  
  3305.  
  3306.                          Bottom_display_history_buffer
  3307.                          Clear_history_buffer
  3308.                          Command_completion_full_screen
  3309.                          Display_history_buffer
  3310.                          Environment_selection_full_screen
  3311.                          Filename_completion_full_screen
  3312.                          Full_screen_menu
  3313.                          Help_screen
  3314.                          List_switchar_programs
  3315.                          Restore_Anarkey
  3316.                          Show_AKAs
  3317.                          Suspend_Anarkey
  3318.                          Toggle_input_mode
  3319.                          Undefine_all_AKAs
  3320.                          Write_history_buffer
  3321.  
  3322.  
  3323.          Bottom_display_history_buffer
  3324.  
  3325.          The history buffer is displayed onscreen starting from the
  3326.          last line in the buffer (i.e. the newest line) and moving
  3327.          toward the first (the oldest line).  This function is
  3328.          identical to pressing <Ctrl-F4> except the output is not
  3329.          paused between screens.  This nonstop display allows the
  3330.          output to be redirected to a disk file via the DOS '>'
  3331.          redirection character.
  3332.  
  3333.          Use the display_history_buffer option to output the buffer
  3334.          from first line to last.
  3335.  
  3336.          The following input lines demonstrate this option.
  3337.  
  3338.  
  3339.                 anarkmd -fbottom_display_history_buffer
  3340.                 anarkmd -fbo
  3341.                 anarkmd -fbo >c:\anarkey\anarkey.log
  3342.  
  3343.  
  3344.          Clear_history_buffer
  3345.  
  3346.          All lines in the history buffer are deleted.  This function
  3347.          is identical to pressing <Ctrl-X>.
  3348.  
  3349.          This function could be useful when placed in an AKA
  3350.          definition.  For example, you may be afraid of accidently
  3351.          pressing <Ctrl-X> and clearing the history buffer.  If so,
  3352.          use Anarked to remove all key assignments for the
  3353.          clear-history-buffer function and then define the following
  3354.          AKA.
  3355.  
  3356.  
  3357.                 :clr_hist       anarkmd -fcl
  3358.  
  3359.  
  3360.          With this setup, you can still clear the buffer when you
  3361.          enter "clr_hist" and there is no danger of accidently
  3362.          erasing it by pressing the wrong key.  Many of the other
  3363.          Anarkmd functions can be used for the same purpose.
  3364.  
  3365.  
  3366.          Command_completion_full_screen
  3367.  
  3368.          The history-buffer window is displayed and processed.  When
  3369.          the <Alt-F5> or <Alt-K> key is pressed, Anarkey invokes
  3370.          Anarkmd with this option to activate the window.
  3371.  
  3372.  
  3373.          Display_history_buffer
  3374.  
  3375.          The history buffer is displayed onscreen starting from the
  3376.          first line in the buffer (i.e. the oldest line) and moving
  3377.          toward the last (the newest line).  This function is
  3378.          identical to pressing <F4> except the output is not paused
  3379.          between screens.  This nonstop display allows the output to
  3380.          be redirected to a disk file via the DOS '>' redirection
  3381.          character.
  3382.  
  3383.          Use the bottom_display_history_buffer option to output the
  3384.          buffer from last line to first.
  3385.  
  3386.  
  3387.          Environment_selection_full_screen
  3388.  
  3389.          The environment variable window is displayed and processed.
  3390.          When the <Alt-F9> or <Alt-E> key is pressed, Anarkey invokes
  3391.          Anarkmd with this option to activate the window.
  3392.  
  3393.  
  3394.          Filename_completion_full_screen
  3395.  
  3396.          The filename-completion window is displayed and processed.
  3397.          When the <Alt-F8> or <Alt-F> key is pressed, Anarkey invokes
  3398.          Anarkmd with this option to activate the window.
  3399.  
  3400.  
  3401.          Full_screen_menu
  3402.  
  3403.          This function implements the actions of the MenuKey.  When
  3404.          <Alt-Tab> or <Shift-Tab> is pressed, Anarkey invokes Anarkmd
  3405.          with this option to activate the window.
  3406.  
  3407.  
  3408.          Help_screen
  3409.  
  3410.          Anarkey's pop-up help screen is displayed and processed.
  3411.          When <Alt-F1> or <Alt-H> is pressed, Anarkey invokes Anarkmd
  3412.          with this option to activate the window.
  3413.  
  3414.  
  3415.          List_switchar_programs
  3416.  
  3417.          The Unix buffer is displayed onscreen.  This function is
  3418.          identical to pressing <Shift-F4> except the output is not
  3419.          paused between screens.  This nonstop display allows the
  3420.          output to be redirected to a disk file via the DOS '>'
  3421.          redirection character.
  3422.  
  3423.  
  3424.          Restore_Anarkey
  3425.  
  3426.          Restores Anarkey processing after it has been disabled by
  3427.          the Suspend_Anarkey option.  This function has no comparable
  3428.          Anarkey key; it is only available from Anarkmd.
  3429.  
  3430.  
  3431.          Show_AKAs
  3432.  
  3433.          All AKAs are displayed onscreen.  This function is identical
  3434.          to pressing <Alt-F4> except the output is not paused between
  3435.          screens.  This nonstop display allows the output to be
  3436.          redirected to a disk file via the DOS '>' redirection
  3437.          character.  By redirecting the output, a text file is
  3438.          created that can be processed by the Load program.
  3439.  
  3440.          The following line demonstrates an AKA definition that saves
  3441.          all AKAs to a disk file.
  3442.  
  3443.  
  3444.                 :save_aka       anarkmd -fsh >c:\anarkey.aka
  3445.  
  3446.  
  3447.          Suspend_Anarkey
  3448.  
  3449.          All Anarkey processing is disabled.  Subsequent requests for
  3450.          input are handled by DOS.  Anarkey can be enabled by running
  3451.          Anarkmd with the Restore_Anarkey option.  This function has
  3452.          no comparable Anarkey key; it is only available from Anarkmd.
  3453.  
  3454.  
  3455.          Toggle_input_mode
  3456.  
  3457.          Anarkey's input mode is toggled to either insert or
  3458.          overwrite mode.  This function is identical to pressing
  3459.          <Ins>.
  3460.  
  3461.  
  3462.          Undefine_all_AKAs
  3463.  
  3464.          All AKAs are deleted.  This function is identical to
  3465.          pressing <Alt-X>.
  3466.  
  3467.  
  3468.          Write_history_buffer
  3469.  
  3470.          The history buffer is written to a disk file.  The file's
  3471.          name is specified along with the function name.  Each is
  3472.          separated by a colon(:).  The filename must be specified;
  3473.          there is no default filename.  The required syntax is shown
  3474.          below.
  3475.  
  3476.  
  3477.                 wr[ite_history_buffer]:filename
  3478.  
  3479.  
  3480.          The filename may include a drive and/or path specification.
  3481.          Sample command lines are shown below.
  3482.  
  3483.  
  3484.                 anarkmd -fwr:history.buf
  3485.                 anarkmd -fwr:c:\anarkey\hist.sav
  3486.                 anarkmd -fwrite_history_buffer:\temp\anarkey.log
  3487.  
  3488.  
  3489.          This function is similar to pressing <Ctrl-W>, but supports
  3490.          the specification of the output file.
  3491.  
  3492.          If you have a batch file you run whenever you power-down
  3493.          your system, this function can be used to save the history
  3494.          buffer between sessions.  Simply add the appropriate Anarkmd
  3495.          line to the batch file to write the history buffer and then
  3496.          place a line in AUTOEXEC which instructs the Load program to
  3497.          restore it.  This is illustrated in the following two files.
  3498.  
  3499.  
  3500.          LOGOFF.BAT
  3501.                 anarkmd -fwr:c:\anarkey.log
  3502.  
  3503.          AUTOEXEC.BAT
  3504.                 load c:\anarkey.log
  3505.  
  3506.  
  3507.          This completes the Anarkey functions which Anarkmd can
  3508.          execute.  The remainder of this section describes additional
  3509.          options that Anarkmd recognizes.
  3510.  
  3511.  
  3512.          Enable Alternative Mouse Interface
  3513.  
  3514.                  -MA     Use alternative mouse interface in pop-up
  3515.                          windows
  3516.  
  3517.          Two different mouse interfaces are available when processing
  3518.          a pop-up window.  The default interface has been described
  3519.          in previous chapters.  The alternative interface is
  3520.          discussed in Appendix I.  To enable the alternative
  3521.          interface, include the -MA option on the Anarkmd command
  3522.          line.
  3523.  
  3524.          The Anarkmd -MA option is the same as Anarkey's -MA option.
  3525.          When Anarkey is installed with -MA and a key is pressed to
  3526.          display a pop-up window, Anarkey executes Anarkmd with the
  3527.          -MA and appropriate -Fx options.
  3528.  
  3529.          The -MA option is ignored if Anarkmd is not processing a
  3530.          pop-up window.
  3531.  
  3532.  
  3533.          Anarkey Process Number
  3534.  
  3535.                  -Pn     Anarkey's process number is n
  3536.  
  3537.          The Anarkmd -P option is identical to the -P recognized by
  3538.          Anarkey.  This option is only necessary in rare situations.
  3539.          Refer to the discussion of the Anarkey -P option in Chapter
  3540.          11 for information on when to use it.
  3541.  
  3542.          Executing an Input Line
  3543.  
  3544.          Anarkmd can execute any valid Anarkey input line passed to
  3545.          it as an argument.  Doing so allows AKAs and
  3546.          multiple-command lines to be executed from batch files.
  3547.          This is demonstrated in the following lines.  (Assume "aka2"
  3548.          is a defined AKA.)
  3549.  
  3550.  
  3551.                 anarkmd aka2 file1 file2 file3
  3552.                 anarkmd cd\temp;copy prog.exe a:;dir a:
  3553.  
  3554.  
  3555.          If the input line contains any DOS redirection characters (
  3556.          >, >> or < ) or the pipe operator(|), surround the entire
  3557.          input line with double quotes.  Example lines are shown
  3558.          below.
  3559.  
  3560.  
  3561.                 anarkmd "dir >dir.log"
  3562.                 anarkmd "aka2 file1 | more;aka2 file2"
  3563.  
  3564.  
  3565.          When Anarkmd executes an input line, it creates a temporary
  3566.          work file.  By default, this file is written to the current
  3567.          directory of the current drive.  The file's location is
  3568.          configurable by defining an environment variable called
  3569.          "ANARTMP."  Set ANARTMP to the drive and/or path in which to
  3570.          write the temporary file.  Anarkmd execution speed can be
  3571.          increased by setting ANARTMP to a RAM disk.  Anarkmd always
  3572.          deletes the temporary file before terminating.  The
  3573.          following line instructs Anarkmd to write the temporary file
  3574.          to the root directory of J: drive.
  3575.  
  3576.  
  3577.                 set anartmp=j:\
  3578.  
  3579.  
  3580.  
  3581.          Chapter 17
  3582.  
  3583.          Convert, AKA-Conversion Utility
  3584.  
  3585.          If you are upgrading to Anarkey from another command-line
  3586.          editor, you may already have a group of defined AKAs or, as
  3587.          they are sometimes referred to, aliases or synonyms.  To
  3588.          make the transition from your current editor to Anarkey, the
  3589.          Convert program is provided to translate your existing AKAs
  3590.          into their equivalent Anarkey syntax.
  3591.  
  3592.          Convert translates alias and synonym definitions for the
  3593.          CED, PCED and DOSEDIT command-line editors.  The
  3594.          command-line syntax is shown below.
  3595.  
  3596.  
  3597.                 convert -type input_file [output_file]
  3598.  
  3599.  
  3600.          The input_file argument specifies the file to convert.  The
  3601.          type argument indicates the kind of definitions contained in
  3602.          the input file, in other words, whether they are CED, PCED
  3603.          or DOSEDIT aliases.  Recognized type arguments are shown
  3604.          below.
  3605.  
  3606.  
  3607.                  -C      CED synonyms
  3608.                  -D      DOSEDIT aliases
  3609.                  -P      PCED synonyms
  3610.  
  3611.  
  3612.          The optional output_file argument designates the file in
  3613.          which to save the converted AKA definitions.  If output_file
  3614.          is not specified, Convert writes its output to ANARKEY.AKA
  3615.          in the current directory of the current drive.
  3616.  
  3617.          Sample Convert input lines are depicted below.
  3618.  
  3619.  
  3620.                 convert -c syn.def anarkey.cfg
  3621.                 convert -d dosedit.ali
  3622.                 convert -p pced.syn c:\bin\anarkey.aka
  3623.  
  3624.  
  3625.          When converting DOSEDIT aliases, no additional editing is
  3626.          required; a 100% translation is performed.
  3627.  
  3628.          Converted CED and PCED synonyms may need some additional
  3629.          touch-up before they are fully Anarkey compatible.  The
  3630.          areas requiring attention are discussed in the remainder of
  3631.          this chapter.
  3632.  
  3633.          Convert recognizes and processes the CED/PCED commands
  3634.          CHAINCH, PARAMCH, SYN and USERSYN.  Any other commands may
  3635.          require some manual conversion.
  3636.  
  3637.          PCALL and PCED's '*' operator is irrelevant in Anarkey
  3638.          because of its more powerful command-completion functions.
  3639.          Thus, Convert removes all asterisk characters from processed
  3640.          names.  After conversion, you should check all PCALL and
  3641.          synonym definitions that used asterisks to see if they are
  3642.          still useful; they may be unnecessary and obsolete with
  3643.          Anarkey.
  3644.  
  3645.          Anarkey does not support nested AKAs and Convert does not
  3646.          look for nested synonyms in the input file.  Any nested
  3647.          CED/PCED synonym will require manual conversion.
  3648.  
  3649.          To all users of other command-line editors, welcome to the
  3650.          wonderful world of Anarkey!
  3651.  
  3652.  
  3653.  
  3654.          Appendix I
  3655.  
  3656.          Alternative Mouse Interface
  3657.  
  3658.          The main chapters in this manual dealt only with Anarkey's
  3659.          default mouse interface.  However, Anarkey supports an
  3660.          additional interface in its pop-up windows.  This
  3661.          alternative mouse interface is used if Anarkey or Anarkmd
  3662.          are executed with the -MA option.
  3663.  
  3664.          The alternative mouse interface does not support a separate
  3665.          mouse cursor or scroll bar.  Instead, mouse movements
  3666.          emulate presses of the <Up> and <Down> arrow keys.  To
  3667.          change the window's current line (i.e. the highlighted line
  3668.          displayed in reverse video), move the mouse in an upward or
  3669.          downward direction.  To scroll the window's contents,
  3670.          attempt to move the current line beyond the top or bottom
  3671.          edge of the window.
  3672.  
  3673.          The current line can be selected and entered onto the input
  3674.          line by clicking the left mouse button.  Double-clicking the
  3675.          left mouse button selects the current line and immediately
  3676.          accepts it for execution.
  3677.  
  3678.          To exit the window, click the right mouse button.
  3679.  
  3680.  
  3681.  
  3682.          Appendix II
  3683.  
  3684.          Anarkey Internals
  3685.  
  3686.          This appendix documents some technical aspects of Anarkey's
  3687.          inner workings.
  3688.  
  3689.          Anarkey users do not need to read or understand the
  3690.          information contained in this section.  It is provided for
  3691.          technical people interested in getting a general
  3692.          under-the-hood view of Anarkey.  This discussion assumes the
  3693.          reader has a basic understanding of DOS functions and TSR
  3694.          program structure.
  3695.  
  3696.          Upon installation, Anarkey hooks into two interrupts: (1)
  3697.          INT 2Fh, also known as the multiplex interrupt, and (2) INT
  3698.          21h, function 0Ah.
  3699.  
  3700.          INT 2Fh is used to store Anarkey's program signature.  When
  3701.          Anarkey starts execution, it checks INT 2Fh to see if its
  3702.          signature, and therefore, a previous instance of the
  3703.          program, is already installed.  Anarkey will not install
  3704.          multiple copies of itself.  If it finds its signature
  3705.          already installed, Anarkey terminates and does not remain
  3706.          resident.
  3707.  
  3708.          INT 2Fh is shared by many programs, for instance, DOS's
  3709.          PRINT and SHARE programs.  Each program is differentiated by
  3710.          a unique process number.  Process numbers 0C0h through 0FFh
  3711.          are reserved for user programs, such as Anarkey.  By
  3712.          default, Anarkey appropriates process number 0E3h.  The -P
  3713.          option can be included on Anarkey's installation line to
  3714.          have it use a different process number.
  3715.  
  3716.          The -P option requires the specification of a value from 0
  3717.          through 63.  Anarkey adds 0C0h to this number to arrive at
  3718.          its process number.
  3719.  
  3720.          If Anarkey determines it is not already installed, it hooks
  3721.          into INT 21h, function 0Ah.  This is DOS's buffered-input
  3722.          routine.  The resident portion of Anarkey is a replacement
  3723.          for this function.
  3724.  
  3725.          Anarkey then terminates and goes resident.  All subsequent
  3726.          requests for buffered input (most often made by the command
  3727.          processor) are intercepted and processed by Anarkey.
  3728.  
  3729.  
  3730.  
  3731.          Appendix III
  3732.  
  3733.          Miscellaneous Considerations
  3734.  
  3735.          A few special situations exist that Anarkey must be able to
  3736.          handle appropriately.  These are described in this appendix.
  3737.          Also included are programs that are incompatible or require
  3738.          special installation to work with Anarkey.
  3739.  
  3740.          Redirecting Output to a Serial Terminal
  3741.  
  3742.          Anarkey supports cursor positioning and many fancy
  3743.          display-related functions.  Unfortunately, serial terminals
  3744.          have no standard method to perform such operations; each
  3745.          terminal supplies its own "standard."  Because of this,
  3746.          Anarkey does not support operation on a serial terminal.
  3747.  
  3748.          In DOS, it is possible to redirect output to a serial
  3749.          terminal (also called the COM device) by two methods: (1)
  3750.          the '>' redirection character and (2) the CTTY command.  If
  3751.          output is redirected via '>' redirection, Anarkey detects it
  3752.          and temporarily disables itself.  Anarkey then monitors the
  3753.          system until output is restored to the video console, at
  3754.          which point it reenables itself.  Note this situation is
  3755.          handled by Anarkey automatically and no user intervention is
  3756.          required.
  3757.  
  3758.          If output is redirected by the CTTY command, Anarkey does
  3759.          not detect it.  If Anarkey is active when the CTTY
  3760.          redirection occurs, the system may hang.  To avoid this,
  3761.          disable Anarkey before executing CTTY.  To disable Anarkey,
  3762.          run Anarkmd with the -FSU option.  After output is restored
  3763.          to the primary video console, run Anarkmd with the -FRE
  3764.          option to reenable Anarkey.
  3765.  
  3766.          Incompatible Programs
  3767.  
  3768.          Some programs are not 100% compatible with Anarkey.  Others
  3769.          require special installation instructions to work in harmony
  3770.          with it.  Both types of programs are discussed in this
  3771.          section.
  3772.  
  3773.  
  3774.                  SIDEKICK
  3775.  
  3776.          Very old versions of Borland's SideKick program do not
  3777.          correctly execute multiple-command lines.  The first command
  3778.          gets executed, but each subsequent command requires that a
  3779.          key (any key) be pressed before it will be executed.  This
  3780.          problem can only be solved by upgrading to a newer version
  3781.          of SideKick.
  3782.  
  3783.  
  3784.                  TOPS Network
  3785.  
  3786.          Anarkey works with the TOPS local area network provided
  3787.          Anarkey is installed after TOPSKRNL and TOPSCLNT.
  3788.  
  3789.          Also, TOPS alters some typed keystroke codes.  This can
  3790.          result in problems when making key assignments with Anarked.
  3791.          To get around this problem, restrict your key assignments to
  3792.          keys not altered by TOPS.
  3793.  
  3794.  
  3795.  
  3796.          Appendix IV
  3797.  
  3798.          Anarkey Keystroke Summary
  3799.  
  3800.          The following table lists Anarkey's default keystroke
  3801.          assignments.
  3802.  
  3803.  
  3804.          Help window                           <Alt-F1> or <Alt-H>
  3805.  
  3806.          Cursor movement:
  3807.                  To start of line              <Home>
  3808.                  To end of line                <End>
  3809.                  Right one character           <Right>
  3810.                  Right one word                <Ctrl-Right>
  3811.                  Left one character            <Left>
  3812.                  Left one word                 <Ctrl-Left>
  3813.  
  3814.          Character deletion:
  3815.                  Character left                <Backspace>
  3816.                  Current character             <Del>
  3817.                  Word right                    <Ctrl-T>
  3818.                  To end of line                <Ctrl-End> or <Ctrl-Y>
  3819.                  Delete line                   <Esc>
  3820.  
  3821.          Character retrieval:
  3822.                  Single char from prev line          <F1>
  3823.                  Remainder of prev line              <F3>
  3824.                  Remainder of prev line and execute  <Alt-F3>
  3825.  
  3826.          General editing:
  3827.                  Accept line                         <Enter>
  3828.                  Toggle input mode                   <Ins>
  3829.                  Accept next keystroke unmodified    <Ctrl-U>
  3830.  
  3831.          MegaKey and MenuKey:
  3832.                  MegaKey                       <Tab>
  3833.                  MenuKey                       <Alt-Tab> or <Shift-Tab>
  3834.  
  3835.          History Buffer Functions
  3836.                  Retrieve previous buffer line <Up>
  3837.                  Retrieve next buffer line     <Down>
  3838.  
  3839.                  Complete line                 <F5> or <Ctrl-K>
  3840.                  Complete line and execute     <F6> or <Ctrl-L>
  3841.  
  3842.                  History-buffer window         <Alt-F5> or <Alt-K>
  3843.  
  3844.                  Restore CBL, get next line    <PgDn>
  3845.  
  3846.                  Display buffer contents             <F4>
  3847.                  Display buffer contents from bottom <Ctrl-F4>
  3848.  
  3849.                  Write buffer to \ANARKEY.LOG        <Ctrl-W>
  3850.                  Save line in buffer, do not execute <Ctrl-Enter>
  3851.                       (or <Ctrl-J>, same key)
  3852.                  Remove current buffer line          <Ctrl-Z>
  3853.                  Clear buffer                        <Ctrl-X>
  3854.  
  3855.          AKA Functions
  3856.                  Display AKAs                  <Alt-F4>
  3857.                  Undefine all AKAs             <Alt-X>
  3858.  
  3859.          Filename Completion Functions
  3860.                  Complete directory name       <F7> or <Ctrl-D>
  3861.                  Complete file/program name    <F8> or <Ctrl-F>
  3862.                  Filename-completion window    <Alt-F8> or <Alt-F>
  3863.  
  3864.          Environment Variable Retrieval
  3865.                  Retrieve environment variable <F9> or <Ctrl-E>
  3866.                  Environment-variable window   <Alt-F9> or <Alt-E>
  3867.  
  3868.          Unix Switchar Support
  3869.                  Display Unix buffer           <Shift-F4>
  3870.  
  3871.          Miscellaneous Functions
  3872.                  Check command lengths         <F2>
  3873.                  Repress multiple-command line <F10> or <Ctrl-R>
  3874.